diff options
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index f48f98110c30..4fc302c2a0e0 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/smp_lock.h> | 14 | #include <linux/smp_lock.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/quotaops.h> | ||
18 | #include <linux/acct.h> | 17 | #include <linux/acct.h> |
19 | #include <linux/capability.h> | 18 | #include <linux/capability.h> |
20 | #include <linux/cpumask.h> | 19 | #include <linux/cpumask.h> |
@@ -1084,7 +1083,6 @@ static int do_umount(struct vfsmount *mnt, int flags) | |||
1084 | down_write(&sb->s_umount); | 1083 | down_write(&sb->s_umount); |
1085 | if (!(sb->s_flags & MS_RDONLY)) { | 1084 | if (!(sb->s_flags & MS_RDONLY)) { |
1086 | lock_kernel(); | 1085 | lock_kernel(); |
1087 | DQUOT_OFF(sb); | ||
1088 | retval = do_remount_sb(sb, MS_RDONLY, NULL, 0); | 1086 | retval = do_remount_sb(sb, MS_RDONLY, NULL, 0); |
1089 | unlock_kernel(); | 1087 | unlock_kernel(); |
1090 | } | 1088 | } |
@@ -1178,17 +1176,6 @@ static int mount_is_safe(struct nameidata *nd) | |||
1178 | #endif | 1176 | #endif |
1179 | } | 1177 | } |
1180 | 1178 | ||
1181 | static int lives_below_in_same_fs(struct dentry *d, struct dentry *dentry) | ||
1182 | { | ||
1183 | while (1) { | ||
1184 | if (d == dentry) | ||
1185 | return 1; | ||
1186 | if (d == NULL || d == d->d_parent) | ||
1187 | return 0; | ||
1188 | d = d->d_parent; | ||
1189 | } | ||
1190 | } | ||
1191 | |||
1192 | struct vfsmount *copy_tree(struct vfsmount *mnt, struct dentry *dentry, | 1179 | struct vfsmount *copy_tree(struct vfsmount *mnt, struct dentry *dentry, |
1193 | int flag) | 1180 | int flag) |
1194 | { | 1181 | { |
@@ -1205,7 +1192,7 @@ struct vfsmount *copy_tree(struct vfsmount *mnt, struct dentry *dentry, | |||
1205 | 1192 | ||
1206 | p = mnt; | 1193 | p = mnt; |
1207 | list_for_each_entry(r, &mnt->mnt_mounts, mnt_child) { | 1194 | list_for_each_entry(r, &mnt->mnt_mounts, mnt_child) { |
1208 | if (!lives_below_in_same_fs(r->mnt_mountpoint, dentry)) | 1195 | if (!is_subdir(r->mnt_mountpoint, dentry)) |
1209 | continue; | 1196 | continue; |
1210 | 1197 | ||
1211 | for (s = r; s; s = next_mnt(s, r)) { | 1198 | for (s = r; s; s = next_mnt(s, r)) { |
@@ -2342,10 +2329,10 @@ void __init mnt_init(void) | |||
2342 | err = sysfs_init(); | 2329 | err = sysfs_init(); |
2343 | if (err) | 2330 | if (err) |
2344 | printk(KERN_WARNING "%s: sysfs_init error: %d\n", | 2331 | printk(KERN_WARNING "%s: sysfs_init error: %d\n", |
2345 | __FUNCTION__, err); | 2332 | __func__, err); |
2346 | fs_kobj = kobject_create_and_add("fs", NULL); | 2333 | fs_kobj = kobject_create_and_add("fs", NULL); |
2347 | if (!fs_kobj) | 2334 | if (!fs_kobj) |
2348 | printk(KERN_WARNING "%s: kobj create error\n", __FUNCTION__); | 2335 | printk(KERN_WARNING "%s: kobj create error\n", __func__); |
2349 | init_rootfs(); | 2336 | init_rootfs(); |
2350 | init_mount_tree(); | 2337 | init_mount_tree(); |
2351 | } | 2338 | } |