Skip to content

Commit 11decaf

Browse files
Trond Myklebustamschuma-ntap
authored andcommitted
NFS: Remove unnecessary inode lock in nfs_fsync_dir()
nfs_inc_stats() is already thread-safe, and there are no other reasons to hold the inode lock here. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent 83f2c45 commit 11decaf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

fs/nfs/dir.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -997,13 +997,9 @@ static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int whence)
997997
static int nfs_fsync_dir(struct file *filp, loff_t start, loff_t end,
998998
int datasync)
999999
{
1000-
struct inode *inode = file_inode(filp);
1001-
10021000
dfprintk(FILE, "NFS: fsync dir(%pD2) datasync %d\n", filp, datasync);
10031001

1004-
inode_lock(inode);
1005-
nfs_inc_stats(inode, NFSIOS_VFSFSYNC);
1006-
inode_unlock(inode);
1002+
nfs_inc_stats(file_inode(filp), NFSIOS_VFSFSYNC);
10071003
return 0;
10081004
}
10091005

0 commit comments

Comments
 (0)