X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=fs%2Fhfs%2Fmdb.c;h=4efb640c4d0cc838938a1d1c202c3eb47d44ecc8;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=f90764f658728a0a21af0bd416a2990d723959bb;hpb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;p=linux-2.6.git diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c index f90764f65..4efb640c4 100644 --- a/fs/hfs/mdb.c +++ b/fs/hfs/mdb.c @@ -200,8 +200,7 @@ int hfs_mdb_get(struct super_block *sb) } attrib = mdb->drAtrb; - if (!(attrib & cpu_to_be16(HFS_SB_ATTRIB_UNMNT)) - || (attrib & cpu_to_be16(HFS_SB_ATTRIB_INCNSTNT))) { + if (!(attrib & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { hfs_warn("HFS-fs warning: Filesystem was not cleanly unmounted, " "running fsck.hfs is recommended. mounting read-only.\n"); sb->s_flags |= MS_RDONLY; @@ -212,8 +211,9 @@ int hfs_mdb_get(struct super_block *sb) } if (!(sb->s_flags & MS_RDONLY)) { /* Mark the volume uncleanly unmounted in case we crash */ - mdb->drAtrb = attrib & cpu_to_be16(~HFS_SB_ATTRIB_UNMNT); - mdb->drAtrb = attrib | cpu_to_be16(HFS_SB_ATTRIB_INCNSTNT); + attrib &= cpu_to_be16(~HFS_SB_ATTRIB_UNMNT); + attrib |= cpu_to_be16(HFS_SB_ATTRIB_INCNSTNT); + mdb->drAtrb = attrib; mdb->drWrCnt = cpu_to_be32(be32_to_cpu(mdb->drWrCnt) + 1); mdb->drLsMod = hfs_mtime();