aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hfsplus/super.c')
-rw-r--r--fs/hfsplus/super.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 154478c71f25..3c9f30e9cd36 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -290,18 +290,25 @@ static int hfsplus_remount(struct super_block *sb, int *flags, char *data)
290 return -EINVAL; 290 return -EINVAL;
291 291
292 if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { 292 if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) {
293 printk(KERN_WARNING "hfs: filesystem was not cleanly unmounted, " 293 printk(KERN_WARNING "hfs: filesystem was "
294 "running fsck.hfsplus is recommended. leaving read-only.\n"); 294 "not cleanly unmounted, "
295 "running fsck.hfsplus is recommended. "
296 "leaving read-only.\n");
295 sb->s_flags |= MS_RDONLY; 297 sb->s_flags |= MS_RDONLY;
296 *flags |= MS_RDONLY; 298 *flags |= MS_RDONLY;
297 } else if (force) { 299 } else if (force) {
298 /* nothing */ 300 /* nothing */
299 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { 301 } else if (vhdr->attributes &
300 printk(KERN_WARNING "hfs: filesystem is marked locked, leaving read-only.\n"); 302 cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) {
303 printk(KERN_WARNING "hfs: filesystem is marked locked, "
304 "leaving read-only.\n");
301 sb->s_flags |= MS_RDONLY; 305 sb->s_flags |= MS_RDONLY;
302 *flags |= MS_RDONLY; 306 *flags |= MS_RDONLY;
303 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { 307 } else if (vhdr->attributes &
304 printk(KERN_WARNING "hfs: filesystem is marked journaled, leaving read-only.\n"); 308 cpu_to_be32(HFSPLUS_VOL_JOURNALED)) {
309 printk(KERN_WARNING "hfs: filesystem is "
310 "marked journaled, "
311 "leaving read-only.\n");
305 sb->s_flags |= MS_RDONLY; 312 sb->s_flags |= MS_RDONLY;
306 *flags |= MS_RDONLY; 313 *flags |= MS_RDONLY;
307 } 314 }
@@ -391,17 +398,22 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
391 sb->s_maxbytes = MAX_LFS_FILESIZE; 398 sb->s_maxbytes = MAX_LFS_FILESIZE;
392 399
393 if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { 400 if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) {
394 printk(KERN_WARNING "hfs: Filesystem was not cleanly unmounted, " 401 printk(KERN_WARNING "hfs: Filesystem was "
395 "running fsck.hfsplus is recommended. mounting read-only.\n"); 402 "not cleanly unmounted, "
403 "running fsck.hfsplus is recommended. "
404 "mounting read-only.\n");
396 sb->s_flags |= MS_RDONLY; 405 sb->s_flags |= MS_RDONLY;
397 } else if (test_and_clear_bit(HFSPLUS_SB_FORCE, &sbi->flags)) { 406 } else if (test_and_clear_bit(HFSPLUS_SB_FORCE, &sbi->flags)) {
398 /* nothing */ 407 /* nothing */
399 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { 408 } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) {
400 printk(KERN_WARNING "hfs: Filesystem is marked locked, mounting read-only.\n"); 409 printk(KERN_WARNING "hfs: Filesystem is marked locked, mounting read-only.\n");
401 sb->s_flags |= MS_RDONLY; 410 sb->s_flags |= MS_RDONLY;
402 } else if ((vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) && !(sb->s_flags & MS_RDONLY)) { 411 } else if ((vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) &&
403 printk(KERN_WARNING "hfs: write access to a journaled filesystem is not supported, " 412 !(sb->s_flags & MS_RDONLY)) {
404 "use the force option at your own risk, mounting read-only.\n"); 413 printk(KERN_WARNING "hfs: write access to "
414 "a journaled filesystem is not supported, "
415 "use the force option at your own risk, "
416 "mounting read-only.\n");
405 sb->s_flags |= MS_RDONLY; 417 sb->s_flags |= MS_RDONLY;
406 } 418 }
407 419