NFS: Don't hold the inode lock across fsync()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 2 Jun 2016 15:03:00 +0000 (11:03 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 22 Jun 2016 13:59:43 +0000 (09:59 -0400)
Commits are no longer required to be serialised.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/file.c

index 29d7477a62e890dde65a26cafda648b2e54c5ce4..249262b6bcbed8bbf24745a71371ce422d7981f3 100644 (file)
@@ -277,11 +277,9 @@ nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync)
                ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
                if (ret != 0)
                        break;
-               inode_lock(inode);
                ret = nfs_file_fsync_commit(file, start, end, datasync);
                if (!ret)
                        ret = pnfs_sync_inode(inode, !!datasync);
-               inode_unlock(inode);
                /*
                 * If nfs_file_fsync_commit detected a server reboot, then
                 * resend all dirty pages that might have been covered by