Commit afa29791 authored by Linus Torvalds's avatar Linus Torvalds

Mark the dentry referenced at dput time.

parent f70158b9
...@@ -137,6 +137,7 @@ void dput(struct dentry *dentry) ...@@ -137,6 +137,7 @@ void dput(struct dentry *dentry)
goto kill_it; goto kill_it;
list_add(&dentry->d_lru, &dentry_unused); list_add(&dentry->d_lru, &dentry_unused);
dentry_stat.nr_unused++; dentry_stat.nr_unused++;
dentry->d_vfs_flags |= DCACHE_REFERENCED;
spin_unlock(&dcache_lock); spin_unlock(&dcache_lock);
return; return;
...@@ -883,7 +884,6 @@ struct dentry * __d_lookup(struct dentry * parent, struct qstr * name) ...@@ -883,7 +884,6 @@ struct dentry * __d_lookup(struct dentry * parent, struct qstr * name)
if (memcmp(dentry->d_name.name, str, len)) if (memcmp(dentry->d_name.name, str, len))
continue; continue;
} }
dentry->d_vfs_flags |= DCACHE_REFERENCED;
return dentry; return dentry;
} }
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment