Skip to contentSkip to conversation

HFSPLUS: Quieten down mounting hfsplus journaled fs read only

PATCH New Mike Crowe 1 participant 1 message Jul 25, 2008 Hfsplus filesystem

lore
Share & tools
lore

Mike Crowe

author
#0 lore raw

PATCH 1/1 HFSPLUS: Quieten down mounting hfsplus journaled fs read only

Check whether the file system was to be mounted read only anyway before warning about changing the mount to read only.

---
 fs/hfsplus/super.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/hfsplus/super.c +1 -1
index ce97a54..a99c3ce 100644
@@ -356,7 +356,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
 	} else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) {
 		printk(KERN_WARNING "hfs: Filesystem is marked locked, mounting read-only.\n");
 		sb->s_flags |= MS_RDONLY;
-	} else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) {
+	} else if ((vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) && !(sb->s_flags & MS_RDONLY)) {
 		printk(KERN_WARNING "hfs: write access to a journaled filesystem is not supported, "
 		       "use the force option at your own risk, mounting read-only.\n");
 		sb->s_flags |= MS_RDONLY;
Signature · 1 line
1.5.6