X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fhfs%2Fmdb.c;h=4efb640c4d0cc838938a1d1c202c3eb47d44ecc8;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=cedb9ab184c38090decb8c28f812fd295a30e969;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c index cedb9ab18..4efb640c4 100644 --- a/fs/hfs/mdb.c +++ b/fs/hfs/mdb.c @@ -71,7 +71,7 @@ int hfs_mdb_get(struct super_block *sb) int off2, len, size, sect; sector_t part_start, part_size; loff_t off; - u16 attrib; + __be16 attrib; /* set the device driver to 512-byte blocks */ size = sb_min_blocksize(sb, HFS_SECTOR_SIZE); @@ -164,7 +164,7 @@ int hfs_mdb_get(struct super_block *sb) hfs_warn("hfs_fs: continuing without an alternate MDB\n"); } - HFS_SB(sb)->bitmap = (u32 *)__get_free_pages(GFP_KERNEL, PAGE_SIZE < 8192 ? 1 : 0); + HFS_SB(sb)->bitmap = (__be32 *)__get_free_pages(GFP_KERNEL, PAGE_SIZE < 8192 ? 1 : 0); if (!HFS_SB(sb)->bitmap) goto out; @@ -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();