From 5ad05cc8e0463f106be7ef5d1074dd877132d60a Mon Sep 17 00:00:00 2001 From: Nikolay Borisov Date: Wed, 4 Mar 2020 18:12:45 +0200 Subject: [PATCH 1/2] vfs: Remove duplicated d_mountpoint check in __is_local_mountpoint This function acts as an out-of-line helper for is_local_mountpoint is only called after the latter verifies the dentry is not a mountpoint. There's no semantic changes and the resulting object code is smaller: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-26 (-26) Function old new delta __is_local_mountpoint 147 121 -26 Total: Before=34161, After=34135, chg -0.08% Signed-off-by: Nikolay Borisov Signed-off-by: Al Viro --- fs/namespace.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index a28e4db075ed..e6aed405611d 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -669,9 +669,6 @@ bool __is_local_mountpoint(struct dentry *dentry) struct mount *mnt; bool is_covered = false; - if (!d_mountpoint(dentry)) - goto out; - down_read(&namespace_sem); list_for_each_entry(mnt, &ns->list, mnt_list) { is_covered = (mnt->mnt_mountpoint == dentry); @@ -679,7 +676,7 @@ bool __is_local_mountpoint(struct dentry *dentry) break; } up_read(&namespace_sem); -out: + return is_covered; } From cc23402c1c2de8b1815212f3924cdbc3cda02b94 Mon Sep 17 00:00:00 2001 From: Yufen Yu Date: Thu, 5 Mar 2020 16:06:39 +0800 Subject: [PATCH 2/2] fs: fix indentation in deactivate_super() Fix the breaked indent in deactive_super(). Signed-off-by: Yufen Yu Signed-off-by: Al Viro --- fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/super.c b/fs/super.c index cd352530eca9..7e3491b96e1d 100644 --- a/fs/super.c +++ b/fs/super.c @@ -361,7 +361,7 @@ EXPORT_SYMBOL(deactivate_locked_super); */ void deactivate_super(struct super_block *s) { - if (!atomic_add_unless(&s->s_active, -1, 1)) { + if (!atomic_add_unless(&s->s_active, -1, 1)) { down_write(&s->s_umount); deactivate_locked_super(s); }