diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 43c5223294e3..54a6893b0299 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -2053,6 +2053,8 @@ nfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) trace_nfs_link_enter(inode, dir, dentry); d_drop(dentry); + if (S_ISREG(inode->i_mode)) + nfs_sync_inode(inode); error = NFS_PROTO(dir)->link(inode, dir, &dentry->d_name); if (error == 0) { ihold(inode);