Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=609005c319bc6062b95ed82e132884ed7e22cdb9 Commit: 609005c319bc6062b95ed82e132884ed7e22cdb9 Parent: fccca7fc6aab4e6b519e2d606ef34632e4f50e33 Author: Trond Myklebust <[EMAIL PROTECTED]> AuthorDate: Mon Jan 28 19:42:59 2008 -0500 Committer: Trond Myklebust <[EMAIL PROTECTED]> CommitDate: Wed Jan 30 02:05:22 2008 -0500
NFS: Sillyrename: in the case of a race, check aliases are really positive In nfs_do_call_unlink() we check that we haven't raced, and that lookup() hasn't created an aliased dentry to our sillydeleted dentry. If somebody has deleted the file on the server and the lookup() resulted in a negative dentry, then ignore... Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]> --- fs/nfs/unlink.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index c5fa6d8..431981d 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c @@ -130,13 +130,15 @@ static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct n alias = d_lookup(parent, &data->args.name); if (alias != NULL) { int ret = 0; + /* * Hey, we raced with lookup... See if we need to transfer * the sillyrename information to the aliased dentry. */ nfs_free_dname(data); spin_lock(&alias->d_lock); - if (!(alias->d_flags & DCACHE_NFSFS_RENAMED)) { + if (alias->d_inode != NULL && + !(alias->d_flags & DCACHE_NFSFS_RENAMED)) { alias->d_fsdata = data; alias->d_flags |= DCACHE_NFSFS_RENAMED; ret = 1; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html