1
0
Fork 0

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>
zero-sugar-mainline-defconfig
Trond Myklebust 2020-10-30 17:57:30 -04:00 committed by Anna Schumaker
parent 83f2c45e63
commit 11decaf812
1 changed files with 1 additions and 5 deletions

View File

@ -997,13 +997,9 @@ static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int whence)
static int nfs_fsync_dir(struct file *filp, loff_t start, loff_t end,
int datasync)
{
struct inode *inode = file_inode(filp);
dfprintk(FILE, "NFS: fsync dir(%pD2) datasync %d\n", filp, datasync);
inode_lock(inode);
nfs_inc_stats(inode, NFSIOS_VFSFSYNC);
inode_unlock(inode);
nfs_inc_stats(file_inode(filp), NFSIOS_VFSFSYNC);
return 0;
}