mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-14 05:55:17 +00:00
autofs_clear_leaf_automount_flags(): use ino->count instead of ->d_subdirs
We want to find out if the parent will become empty after we remove the victim of rmdir(). Checking if the victim is the only element of parent's ->d_subdirs is completely wrong - e.g. opening the parent will end up with a cursor added to its ->d_parent and fooling the check. We do maintain ino->count - 0 for anything removed, 1 + number of children for anything live. Which gives us precisely what we need for that check... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
5f68056ca5
commit
e509d6e9c1
1 changed files with 1 additions and 5 deletions
Loading…
Add table
Add a link
Reference in a new issue