diff options
author | Christoph Hellwig <hch@tuxera.com> | 2010-11-07 23:01:17 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2010-11-07 23:01:17 +0100 |
commit | 6f80dfe55fcbde1e588bc2cfa1273403b710872d (patch) | |
tree | 3851aa0862c6e928de0efa38c39c3ca5905fa5a5 /fs/hfsplus/super.c | |
parent | ff8b16d7e15a8ba2a6086645614a483e048e3fbf (diff) | |
download | kernel_samsung_smdk4412-6f80dfe55fcbde1e588bc2cfa1273403b710872d.zip kernel_samsung_smdk4412-6f80dfe55fcbde1e588bc2cfa1273403b710872d.tar.gz kernel_samsung_smdk4412-6f80dfe55fcbde1e588bc2cfa1273403b710872d.tar.bz2 |
hfsplus: fix option parsing during remount
hfsplus only actually uses the force option during remount, but it uses
the full option parser with a fake superblock to do so. This means remount
will fail if any nls option is set (which happens frequently with older
mount tools), even if it is the same.
Fix this by adding a simpler version of the parser that only parses the force
option for remount.
Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus/super.c')
-rw-r--r-- | fs/hfsplus/super.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 52cc746..1c356a2 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -263,11 +263,9 @@ static int hfsplus_remount(struct super_block *sb, int *flags, char *data) return 0; if (!(*flags & MS_RDONLY)) { struct hfsplus_vh *vhdr = HFSPLUS_SB(sb)->s_vhdr; - struct hfsplus_sb_info sbi; + int force = 0; - memset(&sbi, 0, sizeof(struct hfsplus_sb_info)); - sbi.nls = HFSPLUS_SB(sb)->nls; - if (!hfsplus_parse_options(data, &sbi)) + if (!hfsplus_parse_options_remount(data, &force)) return -EINVAL; if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { @@ -275,7 +273,7 @@ static int hfsplus_remount(struct super_block *sb, int *flags, char *data) "running fsck.hfsplus is recommended. leaving read-only.\n"); sb->s_flags |= MS_RDONLY; *flags |= MS_RDONLY; - } else if (test_bit(HFSPLUS_SB_FORCE, &sbi.flags)) { + } else if (force) { /* nothing */ } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { printk(KERN_WARNING "hfs: filesystem is marked locked, leaving read-only.\n"); |