From 6ab4583e13bc7470dfb2d662d9c882ab4598c05e Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Mon, 28 Jan 2008 19:43:19 -0500 Subject: [PATCH] --- yaml --- r: 79568 b: refs/heads/master c: 77f111929d024165e736e919187cff017279bebe h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/nfs/dir.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a9fbe07323dc..e0aeae652310 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d45b9d8baf41acb177abbbe6746b1dea094b8a28 +refs/heads/master: 77f111929d024165e736e919187cff017279bebe diff --git a/trunk/fs/nfs/dir.c b/trunk/fs/nfs/dir.c index 06f26d40b4fe..32c666c612a1 100644 --- a/trunk/fs/nfs/dir.c +++ b/trunk/fs/nfs/dir.c @@ -826,6 +826,10 @@ static int nfs_dentry_delete(struct dentry *dentry) dentry->d_parent->d_name.name, dentry->d_name.name, dentry->d_flags); + /* Unhash any dentry with a stale inode */ + if (dentry->d_inode != NULL && NFS_STALE(dentry->d_inode)) + return 1; + if (dentry->d_flags & DCACHE_NFSFS_RENAMED) { /* Unhash it, so that ->d_iput() would be called */ return 1;