git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
fs
/
hfs
/
mdb.c
diff --git
a/fs/hfs/mdb.c
b/fs/hfs/mdb.c
index
217e32f
..
b4651e1
100644
(file)
--- a/
fs/hfs/mdb.c
+++ b/
fs/hfs/mdb.c
@@
-10,6
+10,7
@@
#include <linux/cdrom.h>
#include <linux/genhd.h>
#include <linux/cdrom.h>
#include <linux/genhd.h>
+#include <linux/nls.h>
#include "hfs_fs.h"
#include "btree.h"
#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;
}
*start = (sector_t)te.cdte_addr.lba << 2;
return 0;
}
- printk(KERN_ERR "
HFS: I
nvalid session number or type of track\n");
+ printk(KERN_ERR "
hfs: i
nvalid session number or type of track\n");
return -EINVAL;
}
ms_info.addr_format = CDROM_LBA;
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_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 "h
fs: bad allocation block size %d\n", size);
goto out_bh;
}
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)) {
size >>= 1;
brelse(bh);
if (!sb_set_blocksize(sb, size)) {
- printk(
"hfs_
fs: unable to set blocksize to %u\n", size);
+ printk(
KERN_ERR "h
fs: unable to set blocksize to %u\n", size);
goto out;
}
goto out;
}
@@
-160,8
+161,8
@@
int hfs_mdb_get(struct super_block *sb)
}
if (!HFS_SB(sb)->alt_mdb) {
}
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 "h
fs: unable to locate alternate MDB\n");
+
printk(KERN_WARNING "h
fs: continuing without an alternate MDB\n");
}
HFS_SB(sb)->bitmap = (__be32 *)__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);
@@
-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) {
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 "h
fs: unable to read volume bitmap\n");
goto out;
}
off2 = off & (sb->s_blocksize - 1);
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_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 "h
fs: 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) {
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 "h
fs: unable to open catalog tree\n");
goto out;
}
attrib = mdb->drAtrb;
if (!(attrib & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) {
goto out;
}
attrib = mdb->drAtrb;
if (!(attrib & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) {
-
hfs_warn("HFS-fs warning: F
ilesystem was not cleanly unmounted, "
+
printk(KERN_WARNING "hfs: f
ilesystem 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))) {
"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: F
ilesystem is marked locked, mounting read-only.\n");
+
printk(KERN_WARNING "hfs: f
ilesystem is marked locked, mounting read-only.\n");
sb->s_flags |= MS_RDONLY;
}
if (!(sb->s_flags & MS_RDONLY)) {
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) {
while (size) {
bh = sb_bread(sb, block);
if (!bh) {
-
hfs_warn("hfs_
fs: unable to read volume bitmap\n");
+
printk(KERN_ERR "h
fs: unable to read volume bitmap\n");
break;
}
len = min((int)sb->s_blocksize - off, size);
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);
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;
}
kfree(HFS_SB(sb));
sb->s_fs_info = NULL;
}