[lustre-devel] [PATCH 15/24] lustre: llite: Remove inode locking in ll_fsync

James Simmons jsimmons at infradead.org
Tue Sep 21 19:19:52 PDT 2021

From: Oleg Drokin <green at whamcloud.com>

It does not appear to be necessary

WC-bug-id: https://jira.whamcloud.com/browse/LU-14877
Lustre-commit: e8d76d1090e912ee5 ("LU-14877 llite: Remove inode locking in ll_fsync")
Signed-off-by: Oleg Drokin <green at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/44368
Reviewed-by: Patrick Farrell <pfarrell at whamcloud.com>
Reviewed-by: Wang Shilong <wangshilong1991 at gmail.com>
Reviewed-by: Bobi Jam <bobijam at hotmail.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
 fs/lustre/llite/file.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/lustre/llite/file.c b/fs/lustre/llite/file.c
index 10450ce..e60789b 100644
--- a/fs/lustre/llite/file.c
+++ b/fs/lustre/llite/file.c
@@ -4460,7 +4460,6 @@ int ll_fsync(struct file *file, loff_t start, loff_t end, int datasync)
 	rc = file_write_and_wait_range(file, start, end);
-	inode_lock(inode);
 	/* catch async errors that were recorded back when async writeback
 	 * failed for pages in this mapping.
@@ -4503,8 +4502,6 @@ int ll_fsync(struct file *file, loff_t start, loff_t end, int datasync)
 			fd->fd_write_failed = false;
-	inode_unlock(inode);
 	if (!rc)
 		ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_FSYNC,
 				   ktime_us_delta(ktime_get(), kstart));

More information about the lustre-devel mailing list