summary refs log tree commit diff
path: root/fs/binfmt_flat.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-09-17 22:16:58 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2019-09-17 22:16:58 -0400
commite509d6e9c1ab54af257d4ed95b30d41e3d786857 (patch)
tree83e69fbfdd7eb7cebfc21cddbf107b38c5762dac /fs/binfmt_flat.c
parent5f68056ca50fdd3954a93ae66fea7452abddb66f (diff)
downloadlinux-e509d6e9c1ab54af257d4ed95b30d41e3d786857.tar.gz
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>
Diffstat (limited to 'fs/binfmt_flat.c')
0 files changed, 0 insertions, 0 deletions