提交 20509f1b 编写于 作者: T Trond Myklebust

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: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 12f44f46
......@@ -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:
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册