--- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -2488,6 +2488,8 @@ int nfs_rename(struct user_namespace *mn } } + if (S_ISREG(old_inode->i_mode)) + nfs_sync_inode(old_inode); task = nfs_async_rename(old_dir, new_dir, old_dentry, new_dentry, NULL); if (IS_ERR(task)) { error = PTR_ERR(task);