commit | 8c18d76bcba874e872410ca63c7e59b10aafa17d | [log] [tgz] |
---|---|---|
author | Trond Myklebust <trond.myklebust@primarydata.com> | Wed Mar 25 16:40:07 2015 -0400 |
committer | Trond Myklebust <trond.myklebust@primarydata.com> | Fri Mar 27 12:39:39 2015 -0400 |
tree | 4c33a178b6661ca365864219c468451ac6199c63 | |
parent | 5bb89b4702e22981445ae01af733a57d1cae2018 [diff] [blame] |
NFS: Block new writes while syncing data in nfs_getattr() Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index f1fc0e4..0c3be26 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c
@@ -649,7 +649,9 @@ trace_nfs_getattr_enter(inode); /* Flush out writes to the server in order to update c/mtime. */ if (S_ISREG(inode->i_mode)) { + mutex_lock(&inode->i_mutex); err = nfs_sync_inode(inode); + mutex_unlock(&inode->i_mutex); if (err) goto out; }