to_shrink_list(): call only if refcount is 0
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 30 Oct 2023 05:06:06 +0000 (01:06 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 25 Nov 2023 07:34:12 +0000 (02:34 -0500)
commitc2e5e29f3fdaff6f57795be068ce525c60954fd0
treee2b9208f66a15d5ed727d127e26444a1d7d2fb5d
parent5e7a5c8d17d94216aed205cb0f20cd32adfd4487
to_shrink_list(): call only if refcount is 0

The only thing it does if refcount is not zero is d_lru_del(); no
point, IMO, seeing that plain dput() does nothing of that sort...

Note that 2 of 3 current callers are guaranteed that refcount is 0.

Acked-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c