projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41ca197
)
autofs_dir_rmdir(): check ino->count for deciding whether it's empty...
author
Al Viro
<viro@zeniv.linux.org.uk>
Wed, 18 Sep 2019 03:28:08 +0000
(23:28 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Wed, 18 Sep 2019 03:28:08 +0000
(23:28 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/autofs/root.c
patch
|
blob
|
history
diff --git
a/fs/autofs/root.c
b/fs/autofs/root.c
index
7806b11
..
ae1d112
100644
(file)
--- a/
fs/autofs/root.c
+++ b/
fs/autofs/root.c
@@
-691,11
+691,10
@@
static int autofs_dir_rmdir(struct inode *dir, struct dentry *dentry)
if (sbi->flags & AUTOFS_SBI_CATATONIC)
return -EACCES;
- spin_lock(&sbi->lookup_lock);
- if (!simple_empty(dentry)) {
- spin_unlock(&sbi->lookup_lock);
+ if (atomic_read(&ino->count) != 1)
return -ENOTEMPTY;
- }
+
+ spin_lock(&sbi->lookup_lock);
__autofs_add_expiring(dentry);
d_drop(dentry);
spin_unlock(&sbi->lookup_lock);