mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
usbfs: kill racy detection of simple_pin_fs()
can check MS_KERNMOUNT in flags now Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
2452992aa7
commit
01e0fe0b10
1 changed files with 1 additions and 9 deletions
|
@ -50,7 +50,6 @@
|
||||||
static const struct file_operations default_file_operations;
|
static const struct file_operations default_file_operations;
|
||||||
static struct vfsmount *usbfs_mount;
|
static struct vfsmount *usbfs_mount;
|
||||||
static int usbfs_mount_count; /* = 0 */
|
static int usbfs_mount_count; /* = 0 */
|
||||||
static int ignore_mount = 0;
|
|
||||||
|
|
||||||
static struct dentry *devices_usbfs_dentry;
|
static struct dentry *devices_usbfs_dentry;
|
||||||
static int num_buses; /* = 0 */
|
static int num_buses; /* = 0 */
|
||||||
|
@ -256,7 +255,7 @@ static int remount(struct super_block *sb, int *flags, char *data)
|
||||||
* i.e. it's a simple_pin_fs from create_special_files,
|
* i.e. it's a simple_pin_fs from create_special_files,
|
||||||
* then ignore it.
|
* then ignore it.
|
||||||
*/
|
*/
|
||||||
if (ignore_mount)
|
if (*flags & MS_KERNMOUNT)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (parse_options(sb, data)) {
|
if (parse_options(sb, data)) {
|
||||||
|
@ -582,11 +581,6 @@ static int create_special_files (void)
|
||||||
struct dentry *parent;
|
struct dentry *parent;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
/* the simple_pin_fs calls will call remount with no options
|
|
||||||
* without this flag that would overwrite the real mount options (if any)
|
|
||||||
*/
|
|
||||||
ignore_mount = 1;
|
|
||||||
|
|
||||||
/* create the devices special file */
|
/* create the devices special file */
|
||||||
retval = simple_pin_fs(&usb_fs_type, &usbfs_mount, &usbfs_mount_count);
|
retval = simple_pin_fs(&usb_fs_type, &usbfs_mount, &usbfs_mount_count);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
|
@ -594,8 +588,6 @@ static int create_special_files (void)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
ignore_mount = 0;
|
|
||||||
|
|
||||||
parent = usbfs_mount->mnt_root;
|
parent = usbfs_mount->mnt_root;
|
||||||
devices_usbfs_dentry = fs_create_file ("devices",
|
devices_usbfs_dentry = fs_create_file ("devices",
|
||||||
listmode | S_IFREG, parent,
|
listmode | S_IFREG, parent,
|
||||||
|
|
Loading…
Reference in a new issue