mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-19 12:00:00 +00:00
shrink_dentry_list(): no need to check that dentry refcount is marked dead
... we won't see DCACHE_MAY_FREE on anything that is *not* dead and checking d_flags is just as cheap as checking refcount. Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
3fcf535626
commit
cd9f84f35c
@ -1191,11 +1191,10 @@ void shrink_dentry_list(struct list_head *list)
|
||||
spin_lock(&dentry->d_lock);
|
||||
rcu_read_lock();
|
||||
if (!shrink_lock_dentry(dentry)) {
|
||||
bool can_free = false;
|
||||
bool can_free;
|
||||
rcu_read_unlock();
|
||||
d_shrink_del(dentry);
|
||||
if (dentry->d_lockref.count < 0)
|
||||
can_free = dentry->d_flags & DCACHE_MAY_FREE;
|
||||
can_free = dentry->d_flags & DCACHE_MAY_FREE;
|
||||
spin_unlock(&dentry->d_lock);
|
||||
if (can_free)
|
||||
dentry_free(dentry);
|
||||
|
Loading…
x
Reference in New Issue
Block a user