diff options
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r-- | fs/udf/super.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c index 0ba44107d8f1..6832135159b6 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -568,6 +568,7 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options) | |||
568 | if (!udf_parse_options(options, &uopt, true)) | 568 | if (!udf_parse_options(options, &uopt, true)) |
569 | return -EINVAL; | 569 | return -EINVAL; |
570 | 570 | ||
571 | lock_kernel(); | ||
571 | sbi->s_flags = uopt.flags; | 572 | sbi->s_flags = uopt.flags; |
572 | sbi->s_uid = uopt.uid; | 573 | sbi->s_uid = uopt.uid; |
573 | sbi->s_gid = uopt.gid; | 574 | sbi->s_gid = uopt.gid; |
@@ -581,13 +582,16 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options) | |||
581 | *flags |= MS_RDONLY; | 582 | *flags |= MS_RDONLY; |
582 | } | 583 | } |
583 | 584 | ||
584 | if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) | 585 | if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) { |
586 | unlock_kernel(); | ||
585 | return 0; | 587 | return 0; |
588 | } | ||
586 | if (*flags & MS_RDONLY) | 589 | if (*flags & MS_RDONLY) |
587 | udf_close_lvid(sb); | 590 | udf_close_lvid(sb); |
588 | else | 591 | else |
589 | udf_open_lvid(sb); | 592 | udf_open_lvid(sb); |
590 | 593 | ||
594 | unlock_kernel(); | ||
591 | return 0; | 595 | return 0; |
592 | } | 596 | } |
593 | 597 | ||
@@ -2062,6 +2066,9 @@ static void udf_put_super(struct super_block *sb) | |||
2062 | struct udf_sb_info *sbi; | 2066 | struct udf_sb_info *sbi; |
2063 | 2067 | ||
2064 | sbi = UDF_SB(sb); | 2068 | sbi = UDF_SB(sb); |
2069 | |||
2070 | lock_kernel(); | ||
2071 | |||
2065 | if (sbi->s_vat_inode) | 2072 | if (sbi->s_vat_inode) |
2066 | iput(sbi->s_vat_inode); | 2073 | iput(sbi->s_vat_inode); |
2067 | if (sbi->s_partitions) | 2074 | if (sbi->s_partitions) |
@@ -2077,6 +2084,8 @@ static void udf_put_super(struct super_block *sb) | |||
2077 | kfree(sbi->s_partmaps); | 2084 | kfree(sbi->s_partmaps); |
2078 | kfree(sb->s_fs_info); | 2085 | kfree(sb->s_fs_info); |
2079 | sb->s_fs_info = NULL; | 2086 | sb->s_fs_info = NULL; |
2087 | |||
2088 | unlock_kernel(); | ||
2080 | } | 2089 | } |
2081 | 2090 | ||
2082 | static int udf_sync_fs(struct super_block *sb, int wait) | 2091 | static int udf_sync_fs(struct super_block *sb, int wait) |