From: Linus Torvalds Date: Wed, 10 Jun 2020 23:09:11 +0000 (-0700) Subject: Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs X-Git-Tag: v5.10.7~2358 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4dbb29fe9dae033a375f231da9cc27aaa09d2580;p=platform%2Fkernel%2Flinux-rpi.git Merge branch 'work.misc' of git://git./linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "A couple of trivial patches that fell through the cracks last cycle" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: fix indentation in deactivate_super() vfs: Remove duplicated d_mountpoint check in __is_local_mountpoint --- 4dbb29fe9dae033a375f231da9cc27aaa09d2580 diff --cc fs/namespace.c index 7cd6424,e6aed40..f30ed40 --- a/fs/namespace.c +++ b/fs/namespace.c @@@ -684,21 -669,14 +684,18 @@@ bool __is_local_mountpoint(struct dentr struct mount *mnt; bool is_covered = false; - if (!d_mountpoint(dentry)) - goto out; - down_read(&namespace_sem); + lock_ns_list(ns); list_for_each_entry(mnt, &ns->list, mnt_list) { + if (mnt_is_cursor(mnt)) + continue; is_covered = (mnt->mnt_mountpoint == dentry); if (is_covered) break; } + unlock_ns_list(ns); up_read(&namespace_sem); - out: + return is_covered; }