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 --- dir.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: linux-2.6.13-rc6/fs/nfs/dir.c =================================================================== --- linux-2.6.13-rc6.orig/fs/nfs/dir.c +++ linux-2.6.13-rc6/fs/nfs/dir.c @@ -1534,7 +1534,8 @@ static int nfs_rename(struct inode *old_ #endif goto out; } - } + } else + new_inode->i_nlink--; go_ahead: /*