]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - fs/dcache.c
vfs: new internal helper: mnt_has_parent(mnt)
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 24 Nov 2011 00:26:23 +0000 (19:26 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 4 Jan 2012 03:52:36 +0000 (22:52 -0500)
commitb2dba1af3c4157040303a76d25216b1713d333d0
treec846b1c8074d29b9fc02ef3eeda98631dfd6ee94
parentaa9c0e07bb90589186f3b5a0ca97660c2cb50806
vfs: new internal helper: mnt_has_parent(mnt)

vfsmounts have ->mnt_parent pointing either to a different vfsmount
or to itself; it's never NULL and termination condition in loops
traversing the tree towards root is mnt == mnt->mnt_parent.  At least
one place (see the next patch) is confused about what's going on;
let's add an explicit helper checking it right way and use it in
all places where we need it.  Not that there had been too many,
but...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c
fs/mount.h [new file with mode: 0644]
fs/namespace.c
fs/pnode.c
fs/pnode.h