|
@@ -472,7 +472,7 @@ relock:
|
|
|
* inform the fs via d_prune that this dentry is about to be
|
|
|
* unhashed and destroyed.
|
|
|
*/
|
|
|
- if (dentry->d_flags & DCACHE_OP_PRUNE)
|
|
|
+ if ((dentry->d_flags & DCACHE_OP_PRUNE) && !d_unhashed(dentry))
|
|
|
dentry->d_op->d_prune(dentry);
|
|
|
|
|
|
dentry_lru_del(dentry);
|
|
@@ -719,6 +719,14 @@ restart:
|
|
|
hlist_for_each_entry(dentry, &inode->i_dentry, d_alias) {
|
|
|
spin_lock(&dentry->d_lock);
|
|
|
if (!dentry->d_count) {
|
|
|
+ /*
|
|
|
+ * inform the fs via d_prune that this dentry
|
|
|
+ * is about to be unhashed and destroyed.
|
|
|
+ */
|
|
|
+ if ((dentry->d_flags & DCACHE_OP_PRUNE) &&
|
|
|
+ !d_unhashed(dentry))
|
|
|
+ dentry->d_op->d_prune(dentry);
|
|
|
+
|
|
|
__dget_dlock(dentry);
|
|
|
__d_drop(dentry);
|
|
|
spin_unlock(&dentry->d_lock);
|
|
@@ -907,7 +915,8 @@ static void shrink_dcache_for_umount_subtree(struct dentry *dentry)
|
|
|
* inform the fs that this dentry is about to be
|
|
|
* unhashed and destroyed.
|
|
|
*/
|
|
|
- if (dentry->d_flags & DCACHE_OP_PRUNE)
|
|
|
+ if ((dentry->d_flags & DCACHE_OP_PRUNE) &&
|
|
|
+ !d_unhashed(dentry))
|
|
|
dentry->d_op->d_prune(dentry);
|
|
|
|
|
|
dentry_lru_del(dentry);
|