X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fhfs%2Fmdb.c;h=b4651e128d7fbb8e25a3b1767ef1f967ea08b6f0;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=217e32f37e0be7bce323a9962c0cf95adb394b9e;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c index 217e32f37..b4651e128 100644 --- a/fs/hfs/mdb.c +++ b/fs/hfs/mdb.c @@ -10,6 +10,7 @@ #include #include +#include #include "hfs_fs.h" #include "btree.h" @@ -46,7 +47,7 @@ static int hfs_get_last_session(struct super_block *sb, *start = (sector_t)te.cdte_addr.lba << 2; return 0; } - printk(KERN_ERR "HFS: Invalid session number or type of track\n"); + printk(KERN_ERR "hfs: invalid session number or type of track\n"); return -EINVAL; } ms_info.addr_format = CDROM_LBA; @@ -99,7 +100,7 @@ int hfs_mdb_get(struct super_block *sb) HFS_SB(sb)->alloc_blksz = size = be32_to_cpu(mdb->drAlBlkSiz); if (!size || (size & (HFS_SECTOR_SIZE - 1))) { - hfs_warn("hfs_fs: bad allocation block size %d\n", size); + printk(KERN_ERR "hfs: bad allocation block size %d\n", size); goto out_bh; } @@ -116,7 +117,7 @@ int hfs_mdb_get(struct super_block *sb) size >>= 1; brelse(bh); if (!sb_set_blocksize(sb, size)) { - printk("hfs_fs: unable to set blocksize to %u\n", size); + printk(KERN_ERR "hfs: unable to set blocksize to %u\n", size); goto out; } @@ -160,8 +161,8 @@ int hfs_mdb_get(struct super_block *sb) } if (!HFS_SB(sb)->alt_mdb) { - hfs_warn("hfs_fs: unable to locate alternate MDB\n"); - hfs_warn("hfs_fs: continuing without an alternate MDB\n"); + printk(KERN_WARNING "hfs: unable to locate alternate MDB\n"); + printk(KERN_WARNING "hfs: continuing without an alternate MDB\n"); } HFS_SB(sb)->bitmap = (__be32 *)__get_free_pages(GFP_KERNEL, PAGE_SIZE < 8192 ? 1 : 0); @@ -176,7 +177,7 @@ int hfs_mdb_get(struct super_block *sb) while (size) { bh = sb_bread(sb, off >> sb->s_blocksize_bits); if (!bh) { - hfs_warn("hfs_fs: unable to read volume bitmap\n"); + printk(KERN_ERR "hfs: unable to read volume bitmap\n"); goto out; } off2 = off & (sb->s_blocksize - 1); @@ -190,23 +191,23 @@ int hfs_mdb_get(struct super_block *sb) HFS_SB(sb)->ext_tree = hfs_btree_open(sb, HFS_EXT_CNID, hfs_ext_keycmp); if (!HFS_SB(sb)->ext_tree) { - hfs_warn("hfs_fs: unable to open extent tree\n"); + printk(KERN_ERR "hfs: unable to open extent tree\n"); goto out; } HFS_SB(sb)->cat_tree = hfs_btree_open(sb, HFS_CAT_CNID, hfs_cat_keycmp); if (!HFS_SB(sb)->cat_tree) { - hfs_warn("hfs_fs: unable to open catalog tree\n"); + printk(KERN_ERR "hfs: unable to open catalog tree\n"); goto out; } attrib = mdb->drAtrb; if (!(attrib & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { - hfs_warn("HFS-fs warning: Filesystem was not cleanly unmounted, " + printk(KERN_WARNING "hfs: filesystem was not cleanly unmounted, " "running fsck.hfs is recommended. mounting read-only.\n"); sb->s_flags |= MS_RDONLY; } if ((attrib & cpu_to_be16(HFS_SB_ATTRIB_SLOCK))) { - hfs_warn("HFS-fs: Filesystem is marked locked, mounting read-only.\n"); + printk(KERN_WARNING "hfs: filesystem is marked locked, mounting read-only.\n"); sb->s_flags |= MS_RDONLY; } if (!(sb->s_flags & MS_RDONLY)) { @@ -302,7 +303,7 @@ void hfs_mdb_commit(struct super_block *sb) while (size) { bh = sb_bread(sb, block); if (!bh) { - hfs_warn("hfs_fs: unable to read volume bitmap\n"); + printk(KERN_ERR "hfs: unable to read volume bitmap\n"); break; } len = min((int)sb->s_blocksize - off, size); @@ -343,6 +344,11 @@ void hfs_mdb_put(struct super_block *sb) brelse(HFS_SB(sb)->mdb_bh); brelse(HFS_SB(sb)->alt_mdb_bh); + if (HFS_SB(sb)->nls_io) + unload_nls(HFS_SB(sb)->nls_io); + if (HFS_SB(sb)->nls_disk) + unload_nls(HFS_SB(sb)->nls_disk); + kfree(HFS_SB(sb)); sb->s_fs_info = NULL; }