Commit 7ec02ef1596bb3c829a7e8b65ebf13b87faf1819

Authored by Jan Blunck
Committed by Linus Torvalds
1 parent c5c8be3ce5

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>

Showing 1 changed file with 1 additions and 12 deletions Side-by-side Diff

... ... @@ -1176,17 +1176,6 @@
1176 1176 #endif
1177 1177 }
1178 1178  
1179   -static 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   -
1190 1179 struct vfsmount *copy_tree(struct vfsmount *mnt, struct dentry *dentry,
1191 1180 int flag)
1192 1181 {
... ... @@ -1203,7 +1192,7 @@
1203 1192  
1204 1193 p = mnt;
1205 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 1196 continue;
1208 1197  
1209 1198 for (s = r; s; s = next_mnt(s, r)) {