diff options
-rw-r--r-- | fs/namespace.c | 2 | ||||
-rw-r--r-- | fs/super.c | 6 | ||||
-rw-r--r-- | include/linux/fs.h | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 07daa7972591..860752998fb3 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1411,7 +1411,7 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, | |||
1411 | mnt_flags |= MNT_RELATIME; | 1411 | mnt_flags |= MNT_RELATIME; |
1412 | 1412 | ||
1413 | flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | | 1413 | flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | |
1414 | MS_NOATIME | MS_NODIRATIME | MS_RELATIME); | 1414 | MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT); |
1415 | 1415 | ||
1416 | /* ... and get the mountpoint */ | 1416 | /* ... and get the mountpoint */ |
1417 | retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd); | 1417 | retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd); |
diff --git a/fs/super.c b/fs/super.c index feaae7eeaffd..d28fde7e1cfb 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -944,9 +944,9 @@ do_kern_mount(const char *fstype, int flags, const char *name, void *data) | |||
944 | return mnt; | 944 | return mnt; |
945 | } | 945 | } |
946 | 946 | ||
947 | struct vfsmount *kern_mount(struct file_system_type *type) | 947 | struct vfsmount *kern_mount_data(struct file_system_type *type, void *data) |
948 | { | 948 | { |
949 | return vfs_kern_mount(type, 0, type->name, NULL); | 949 | return vfs_kern_mount(type, MS_KERNMOUNT, type->name, data); |
950 | } | 950 | } |
951 | 951 | ||
952 | EXPORT_SYMBOL(kern_mount); | 952 | EXPORT_SYMBOL_GPL(kern_mount_data); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3efff12049c6..1657e995f72c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -123,6 +123,7 @@ extern int dir_notify_enable; | |||
123 | #define MS_SLAVE (1<<19) /* change to slave */ | 123 | #define MS_SLAVE (1<<19) /* change to slave */ |
124 | #define MS_SHARED (1<<20) /* change to shared */ | 124 | #define MS_SHARED (1<<20) /* change to shared */ |
125 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ | 125 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ |
126 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ | ||
126 | #define MS_ACTIVE (1<<30) | 127 | #define MS_ACTIVE (1<<30) |
127 | #define MS_NOUSER (1<<31) | 128 | #define MS_NOUSER (1<<31) |
128 | 129 | ||
@@ -1459,7 +1460,8 @@ void unnamed_dev_init(void); | |||
1459 | 1460 | ||
1460 | extern int register_filesystem(struct file_system_type *); | 1461 | extern int register_filesystem(struct file_system_type *); |
1461 | extern int unregister_filesystem(struct file_system_type *); | 1462 | extern int unregister_filesystem(struct file_system_type *); |
1462 | extern struct vfsmount *kern_mount(struct file_system_type *); | 1463 | extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data); |
1464 | #define kern_mount(type) kern_mount_data(type, NULL) | ||
1463 | extern int may_umount_tree(struct vfsmount *); | 1465 | extern int may_umount_tree(struct vfsmount *); |
1464 | extern int may_umount(struct vfsmount *); | 1466 | extern int may_umount(struct vfsmount *); |
1465 | extern void umount_tree(struct vfsmount *, int, struct list_head *); | 1467 | extern void umount_tree(struct vfsmount *, int, struct list_head *); |