提交 8c18d76b 编写于 作者: T Trond Myklebust

NFS: Block new writes while syncing data in nfs_getattr()

Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
上级 5bb89b47
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册