diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-01-28 19:43:19 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-01-30 02:05:22 -0500 |
commit | 77f111929d024165e736e919187cff017279bebe (patch) | |
tree | fb03b66823f8c60e8efcdb40f93fadd2fc283e80 /fs | |
parent | d45b9d8baf41acb177abbbe6746b1dea094b8a28 (diff) | |
download | linux-77f111929d024165e736e919187cff017279bebe.tar.gz linux-77f111929d024165e736e919187cff017279bebe.tar.bz2 linux-77f111929d024165e736e919187cff017279bebe.zip |
NFS: Ensure that we eject stale inodes as soon as possible
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/dir.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 06f26d40b4fe..32c666c612a1 100644 --- a/fs/nfs/dir.c +++ b/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; |