Loading drivers/usb/core/inode.c +5 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ #include <linux/parser.h> #include <linux/notifier.h> #include <linux/seq_file.h> #include <linux/smp_lock.h> #include <asm/byteorder.h> #include "usb.h" #include "hcd.h" Loading Loading @@ -265,9 +266,13 @@ static int remount(struct super_block *sb, int *flags, char *data) return -EINVAL; } lock_kernel(); if (usbfs_mount && usbfs_mount->mnt_sb) update_sb(usbfs_mount->mnt_sb); unlock_kernel(); return 0; } Loading fs/affs/super.c +6 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #include <linux/parser.h> #include <linux/magic.h> #include <linux/sched.h> #include <linux/smp_lock.h> #include "affs.h" extern struct timezone sys_tz; Loading Loading @@ -512,6 +513,7 @@ affs_remount(struct super_block *sb, int *flags, char *data) kfree(new_opts); return -EINVAL; } lock_kernel(); replace_mount_options(sb, new_opts); sbi->s_flags = mount_flags; Loading @@ -519,8 +521,10 @@ affs_remount(struct super_block *sb, int *flags, char *data) sbi->s_uid = uid; sbi->s_gid = gid; if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) { unlock_kernel(); return 0; } if (*flags & MS_RDONLY) { sb->s_dirt = 1; while (sb->s_dirt) Loading @@ -529,6 +533,7 @@ affs_remount(struct super_block *sb, int *flags, char *data) } else res = affs_init_bitmap(sb, flags); unlock_kernel(); return res; } Loading fs/ext2/super.c +10 −2 Original line number Diff line number Diff line Loading @@ -1162,6 +1162,8 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) unsigned long old_sb_flags; int err; lock_kernel(); /* Store the old options */ old_sb_flags = sb->s_flags; old_opts.s_mount_opt = sbi->s_mount_opt; Loading Loading @@ -1197,12 +1199,16 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) sbi->s_mount_opt &= ~EXT2_MOUNT_XIP; sbi->s_mount_opt |= old_mount_opt & EXT2_MOUNT_XIP; } if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) { unlock_kernel(); return 0; } if (*flags & MS_RDONLY) { if (le16_to_cpu(es->s_state) & EXT2_VALID_FS || !(sbi->s_mount_state & EXT2_VALID_FS)) !(sbi->s_mount_state & EXT2_VALID_FS)) { unlock_kernel(); return 0; } /* * OK, we are remounting a valid rw partition rdonly, so set * the rdonly flag and then mark the partition as valid again. Loading @@ -1229,12 +1235,14 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) sb->s_flags &= ~MS_RDONLY; } ext2_sync_super(sb, es); unlock_kernel(); return 0; restore_opts: sbi->s_mount_opt = old_opts.s_mount_opt; sbi->s_resuid = old_opts.s_resuid; sbi->s_resgid = old_opts.s_resgid; sb->s_flags = old_sb_flags; unlock_kernel(); return err; } Loading fs/ext3/super.c +4 −0 Original line number Diff line number Diff line Loading @@ -2490,6 +2490,8 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) int i; #endif lock_kernel(); /* Store the original options */ lock_super(sb); old_sb_flags = sb->s_flags; Loading Loading @@ -2600,6 +2602,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) kfree(old_opts.s_qf_names[i]); #endif unlock_super(sb); unlock_kernel(); return 0; restore_opts: sb->s_flags = old_sb_flags; Loading @@ -2617,6 +2620,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) } #endif unlock_super(sb); unlock_kernel(); return err; } Loading fs/ext4/super.c +4 −0 Original line number Diff line number Diff line Loading @@ -3422,6 +3422,8 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) int i; #endif lock_kernel(); /* Store the original options */ lock_super(sb); old_sb_flags = sb->s_flags; Loading Loading @@ -3558,6 +3560,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) kfree(old_opts.s_qf_names[i]); #endif unlock_super(sb); unlock_kernel(); return 0; restore_opts: Loading @@ -3578,6 +3581,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) } #endif unlock_super(sb); unlock_kernel(); return err; } Loading Loading
drivers/usb/core/inode.c +5 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ #include <linux/parser.h> #include <linux/notifier.h> #include <linux/seq_file.h> #include <linux/smp_lock.h> #include <asm/byteorder.h> #include "usb.h" #include "hcd.h" Loading Loading @@ -265,9 +266,13 @@ static int remount(struct super_block *sb, int *flags, char *data) return -EINVAL; } lock_kernel(); if (usbfs_mount && usbfs_mount->mnt_sb) update_sb(usbfs_mount->mnt_sb); unlock_kernel(); return 0; } Loading
fs/affs/super.c +6 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #include <linux/parser.h> #include <linux/magic.h> #include <linux/sched.h> #include <linux/smp_lock.h> #include "affs.h" extern struct timezone sys_tz; Loading Loading @@ -512,6 +513,7 @@ affs_remount(struct super_block *sb, int *flags, char *data) kfree(new_opts); return -EINVAL; } lock_kernel(); replace_mount_options(sb, new_opts); sbi->s_flags = mount_flags; Loading @@ -519,8 +521,10 @@ affs_remount(struct super_block *sb, int *flags, char *data) sbi->s_uid = uid; sbi->s_gid = gid; if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) { unlock_kernel(); return 0; } if (*flags & MS_RDONLY) { sb->s_dirt = 1; while (sb->s_dirt) Loading @@ -529,6 +533,7 @@ affs_remount(struct super_block *sb, int *flags, char *data) } else res = affs_init_bitmap(sb, flags); unlock_kernel(); return res; } Loading
fs/ext2/super.c +10 −2 Original line number Diff line number Diff line Loading @@ -1162,6 +1162,8 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) unsigned long old_sb_flags; int err; lock_kernel(); /* Store the old options */ old_sb_flags = sb->s_flags; old_opts.s_mount_opt = sbi->s_mount_opt; Loading Loading @@ -1197,12 +1199,16 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) sbi->s_mount_opt &= ~EXT2_MOUNT_XIP; sbi->s_mount_opt |= old_mount_opt & EXT2_MOUNT_XIP; } if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) { unlock_kernel(); return 0; } if (*flags & MS_RDONLY) { if (le16_to_cpu(es->s_state) & EXT2_VALID_FS || !(sbi->s_mount_state & EXT2_VALID_FS)) !(sbi->s_mount_state & EXT2_VALID_FS)) { unlock_kernel(); return 0; } /* * OK, we are remounting a valid rw partition rdonly, so set * the rdonly flag and then mark the partition as valid again. Loading @@ -1229,12 +1235,14 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) sb->s_flags &= ~MS_RDONLY; } ext2_sync_super(sb, es); unlock_kernel(); return 0; restore_opts: sbi->s_mount_opt = old_opts.s_mount_opt; sbi->s_resuid = old_opts.s_resuid; sbi->s_resgid = old_opts.s_resgid; sb->s_flags = old_sb_flags; unlock_kernel(); return err; } Loading
fs/ext3/super.c +4 −0 Original line number Diff line number Diff line Loading @@ -2490,6 +2490,8 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) int i; #endif lock_kernel(); /* Store the original options */ lock_super(sb); old_sb_flags = sb->s_flags; Loading Loading @@ -2600,6 +2602,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) kfree(old_opts.s_qf_names[i]); #endif unlock_super(sb); unlock_kernel(); return 0; restore_opts: sb->s_flags = old_sb_flags; Loading @@ -2617,6 +2620,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) } #endif unlock_super(sb); unlock_kernel(); return err; } Loading
fs/ext4/super.c +4 −0 Original line number Diff line number Diff line Loading @@ -3422,6 +3422,8 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) int i; #endif lock_kernel(); /* Store the original options */ lock_super(sb); old_sb_flags = sb->s_flags; Loading Loading @@ -3558,6 +3560,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) kfree(old_opts.s_qf_names[i]); #endif unlock_super(sb); unlock_kernel(); return 0; restore_opts: Loading @@ -3578,6 +3581,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) } #endif unlock_super(sb); unlock_kernel(); return err; } Loading