projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bb89b4
)
NFS: Block new writes while syncing data in nfs_getattr()
author
Trond Myklebust
<trond.myklebust@primarydata.com>
Wed, 25 Mar 2015 20:40:07 +0000
(16:40 -0400)
committer
Trond Myklebust
<trond.myklebust@primarydata.com>
Fri, 27 Mar 2015 16:39:39 +0000
(12:39 -0400)
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/inode.c
patch
|
blob
|
history
diff --git
a/fs/nfs/inode.c
b/fs/nfs/inode.c
index f1fc0e4c1c023ab6a656d8d83f8256b338520974..0c3be2658546f1e1b88397c180a0063313d30e0c 100644
(file)
--- a/
fs/nfs/inode.c
+++ b/
fs/nfs/inode.c
@@
-649,7
+649,9
@@
int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
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;
}