summaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-29 01:41:54 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-29 01:41:54 +0000
commitf969d69ba9f952e5bdd38278e25e26a3e4a61a70 (patch)
treeb3530d803df59d726afaabebc6626987dee1ca05 /fs/dcache.c
parenta10ce7ef2066b455d69187643ddf2073bfc4db24 (diff)
Merge with 2.3.27.
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index b6f7a7203..f96f8cf7f 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -214,7 +214,8 @@ static inline void prune_one_dentry(struct dentry * dentry)
dentry_iput(dentry);
parent = dentry->d_parent;
d_free(dentry);
- dput(parent);
+ if (parent != dentry)
+ dput(parent);
}
/*
@@ -712,7 +713,7 @@ char * d_path(struct dentry *dentry, char *buffer, int buflen)
*--end = '\0';
buflen--;
- if (dentry->d_parent != dentry && list_empty(&dentry->d_hash)) {
+ if (!IS_ROOT(dentry) && list_empty(&dentry->d_hash)) {
buflen -= 10;
end -= 10;
memcpy(end, " (deleted)", 10);