diff options
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index d25d4602ab50..d5906c19e08e 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1246,6 +1246,21 @@ void drop_collected_mounts(struct vfsmount *mnt) | |||
1246 | release_mounts(&umount_list); | 1246 | release_mounts(&umount_list); |
1247 | } | 1247 | } |
1248 | 1248 | ||
1249 | int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, | ||
1250 | struct vfsmount *root) | ||
1251 | { | ||
1252 | struct vfsmount *mnt; | ||
1253 | int res = f(root, arg); | ||
1254 | if (res) | ||
1255 | return res; | ||
1256 | list_for_each_entry(mnt, &root->mnt_list, mnt_list) { | ||
1257 | res = f(mnt, arg); | ||
1258 | if (res) | ||
1259 | return res; | ||
1260 | } | ||
1261 | return 0; | ||
1262 | } | ||
1263 | |||
1249 | static void cleanup_group_ids(struct vfsmount *mnt, struct vfsmount *end) | 1264 | static void cleanup_group_ids(struct vfsmount *mnt, struct vfsmount *end) |
1250 | { | 1265 | { |
1251 | struct vfsmount *p; | 1266 | struct vfsmount *p; |