aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Blunck <jblunck@suse.de>2008-04-29 03:59:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:06 -0400
commit7ec02ef1596bb3c829a7e8b65ebf13b87faf1819 (patch)
treed098192558b74f3b33634499ec6e60f3ee32bb47 /fs
parentc5c8be3ce59dc59baf20b33dae3f8eb70af7b1f1 (diff)
vfs: remove lives_below_in_same_fs()
Remove lives_below_in_same_fs() since is_subdir() from fs/dcache.c is providing the same functionality. Signed-off-by: Jan Blunck <jblunck@suse.de> Acked-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/namespace.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index fe376805cf5f..061e5edb4d27 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1176,17 +1176,6 @@ static int mount_is_safe(struct nameidata *nd)
1176#endif 1176#endif
1177} 1177}
1178 1178
1179static int lives_below_in_same_fs(struct dentry *d, struct dentry *dentry)
1180{
1181 while (1) {
1182 if (d == dentry)
1183 return 1;
1184 if (d == NULL || d == d->d_parent)
1185 return 0;
1186 d = d->d_parent;
1187 }
1188}
1189
1190struct vfsmount *copy_tree(struct vfsmount *mnt, struct dentry *dentry, 1179struct vfsmount *copy_tree(struct vfsmount *mnt, struct dentry *dentry,
1191 int flag) 1180 int flag)
1192{ 1181{
@@ -1203,7 +1192,7 @@ struct vfsmount *copy_tree(struct vfsmount *mnt, struct dentry *dentry,
1203 1192
1204 p = mnt; 1193 p = mnt;
1205 list_for_each_entry(r, &mnt->mnt_mounts, mnt_child) { 1194 list_for_each_entry(r, &mnt->mnt_mounts, mnt_child) {
1206 if (!lives_below_in_same_fs(r->mnt_mountpoint, dentry)) 1195 if (!is_subdir(r->mnt_mountpoint, dentry))
1207 continue; 1196 continue;
1208 1197
1209 for (s = r; s; s = next_mnt(s, r)) { 1198 for (s = r; s; s = next_mnt(s, r)) {