From: Jan Blunck Remove lives_below_in_same_fs() since is_subdir() from fs/dcache.c is providing the same functionality. Signed-off-by: Jan Blunck Acked-by: Miklos Szeredi Cc: Al Viro Cc: Christoph Hellwig Signed-off-by: Andrew Morton --- fs/namespace.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff -puN fs/namespace.c~vfs-remove-lives_below_in_same_fs fs/namespace.c --- a/fs/namespace.c~vfs-remove-lives_below_in_same_fs +++ a/fs/namespace.c @@ -1174,17 +1174,6 @@ static int mount_is_safe(struct nameidat #endif } -static int lives_below_in_same_fs(struct dentry *d, struct dentry *dentry) -{ - while (1) { - if (d == dentry) - return 1; - if (d == NULL || d == d->d_parent) - return 0; - d = d->d_parent; - } -} - struct vfsmount *copy_tree(struct vfsmount *mnt, struct dentry *dentry, int flag) { @@ -1201,7 +1190,7 @@ struct vfsmount *copy_tree(struct vfsmou p = mnt; list_for_each_entry(r, &mnt->mnt_mounts, mnt_child) { - if (!lives_below_in_same_fs(r->mnt_mountpoint, dentry)) + if (!is_subdir(r->mnt_mountpoint, dentry)) continue; for (s = r; s; s = next_mnt(s, r)) { _