Skip to content

Commit 5ad05cc

Browse files
lorddoskiasAl Viro
authored andcommitted
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 <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 8f3d9f3 commit 5ad05cc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fs/namespace.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -669,17 +669,14 @@ bool __is_local_mountpoint(struct dentry *dentry)
669669
struct mount *mnt;
670670
bool is_covered = false;
671671

672-
if (!d_mountpoint(dentry))
673-
goto out;
674-
675672
down_read(&namespace_sem);
676673
list_for_each_entry(mnt, &ns->list, mnt_list) {
677674
is_covered = (mnt->mnt_mountpoint == dentry);
678675
if (is_covered)
679676
break;
680677
}
681678
up_read(&namespace_sem);
682-
out:
679+
683680
return is_covered;
684681
}
685682

0 commit comments

Comments
 (0)