mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
NFS: Drop inode after rename
When doing a rename on top of an existing file that is not in use, the inode of the overwritten file will remain in the icache. The fix is to decrement i_nlink of the overwritten inode, like we do for unlink, rmdir etc already. Problem diagnosed by Olaf Kirch. This patch is a slight variation on his fix. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
12f44f46bc
commit
20509f1bc5
1 changed files with 2 additions and 1 deletions
|
@ -1539,7 +1539,8 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||
#endif
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
} else
|
||||
new_inode->i_nlink--;
|
||||
|
||||
go_ahead:
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue