aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfs/mdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hfs/mdb.c')
-rw-r--r--fs/hfs/mdb.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c
index b7ec224910c5..aa3f0d6d043c 100644
--- a/fs/hfs/mdb.c
+++ b/fs/hfs/mdb.c
@@ -48,7 +48,7 @@ static int hfs_get_last_session(struct super_block *sb,
48 *start = (sector_t)te.cdte_addr.lba << 2; 48 *start = (sector_t)te.cdte_addr.lba << 2;
49 return 0; 49 return 0;
50 } 50 }
51 printk(KERN_ERR "hfs: invalid session number or type of track\n"); 51 pr_err("invalid session number or type of track\n");
52 return -EINVAL; 52 return -EINVAL;
53 } 53 }
54 ms_info.addr_format = CDROM_LBA; 54 ms_info.addr_format = CDROM_LBA;
@@ -101,7 +101,7 @@ int hfs_mdb_get(struct super_block *sb)
101 101
102 HFS_SB(sb)->alloc_blksz = size = be32_to_cpu(mdb->drAlBlkSiz); 102 HFS_SB(sb)->alloc_blksz = size = be32_to_cpu(mdb->drAlBlkSiz);
103 if (!size || (size & (HFS_SECTOR_SIZE - 1))) { 103 if (!size || (size & (HFS_SECTOR_SIZE - 1))) {
104 printk(KERN_ERR "hfs: bad allocation block size %d\n", size); 104 pr_err("bad allocation block size %d\n", size);
105 goto out_bh; 105 goto out_bh;
106 } 106 }
107 107
@@ -118,7 +118,7 @@ int hfs_mdb_get(struct super_block *sb)
118 size >>= 1; 118 size >>= 1;
119 brelse(bh); 119 brelse(bh);
120 if (!sb_set_blocksize(sb, size)) { 120 if (!sb_set_blocksize(sb, size)) {
121 printk(KERN_ERR "hfs: unable to set blocksize to %u\n", size); 121 pr_err("unable to set blocksize to %u\n", size);
122 goto out; 122 goto out;
123 } 123 }
124 124
@@ -162,8 +162,8 @@ int hfs_mdb_get(struct super_block *sb)
162 } 162 }
163 163
164 if (!HFS_SB(sb)->alt_mdb) { 164 if (!HFS_SB(sb)->alt_mdb) {
165 printk(KERN_WARNING "hfs: unable to locate alternate MDB\n"); 165 pr_warn("unable to locate alternate MDB\n");
166 printk(KERN_WARNING "hfs: continuing without an alternate MDB\n"); 166 pr_warn("continuing without an alternate MDB\n");
167 } 167 }
168 168
169 HFS_SB(sb)->bitmap = (__be32 *)__get_free_pages(GFP_KERNEL, PAGE_SIZE < 8192 ? 1 : 0); 169 HFS_SB(sb)->bitmap = (__be32 *)__get_free_pages(GFP_KERNEL, PAGE_SIZE < 8192 ? 1 : 0);
@@ -178,7 +178,7 @@ int hfs_mdb_get(struct super_block *sb)
178 while (size) { 178 while (size) {
179 bh = sb_bread(sb, off >> sb->s_blocksize_bits); 179 bh = sb_bread(sb, off >> sb->s_blocksize_bits);
180 if (!bh) { 180 if (!bh) {
181 printk(KERN_ERR "hfs: unable to read volume bitmap\n"); 181 pr_err("unable to read volume bitmap\n");
182 goto out; 182 goto out;
183 } 183 }
184 off2 = off & (sb->s_blocksize - 1); 184 off2 = off & (sb->s_blocksize - 1);
@@ -192,23 +192,22 @@ int hfs_mdb_get(struct super_block *sb)
192 192
193 HFS_SB(sb)->ext_tree = hfs_btree_open(sb, HFS_EXT_CNID, hfs_ext_keycmp); 193 HFS_SB(sb)->ext_tree = hfs_btree_open(sb, HFS_EXT_CNID, hfs_ext_keycmp);
194 if (!HFS_SB(sb)->ext_tree) { 194 if (!HFS_SB(sb)->ext_tree) {
195 printk(KERN_ERR "hfs: unable to open extent tree\n"); 195 pr_err("unable to open extent tree\n");
196 goto out; 196 goto out;
197 } 197 }
198 HFS_SB(sb)->cat_tree = hfs_btree_open(sb, HFS_CAT_CNID, hfs_cat_keycmp); 198 HFS_SB(sb)->cat_tree = hfs_btree_open(sb, HFS_CAT_CNID, hfs_cat_keycmp);
199 if (!HFS_SB(sb)->cat_tree) { 199 if (!HFS_SB(sb)->cat_tree) {
200 printk(KERN_ERR "hfs: unable to open catalog tree\n"); 200 pr_err("unable to open catalog tree\n");
201 goto out; 201 goto out;
202 } 202 }
203 203
204 attrib = mdb->drAtrb; 204 attrib = mdb->drAtrb;
205 if (!(attrib & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { 205 if (!(attrib & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) {
206 printk(KERN_WARNING "hfs: filesystem was not cleanly unmounted, " 206 pr_warn("filesystem was not cleanly unmounted, running fsck.hfs is recommended. mounting read-only.\n");
207 "running fsck.hfs is recommended. mounting read-only.\n");
208 sb->s_flags |= MS_RDONLY; 207 sb->s_flags |= MS_RDONLY;
209 } 208 }
210 if ((attrib & cpu_to_be16(HFS_SB_ATTRIB_SLOCK))) { 209 if ((attrib & cpu_to_be16(HFS_SB_ATTRIB_SLOCK))) {
211 printk(KERN_WARNING "hfs: filesystem is marked locked, mounting read-only.\n"); 210 pr_warn("filesystem is marked locked, mounting read-only.\n");
212 sb->s_flags |= MS_RDONLY; 211 sb->s_flags |= MS_RDONLY;
213 } 212 }
214 if (!(sb->s_flags & MS_RDONLY)) { 213 if (!(sb->s_flags & MS_RDONLY)) {
@@ -312,7 +311,7 @@ void hfs_mdb_commit(struct super_block *sb)
312 while (size) { 311 while (size) {
313 bh = sb_bread(sb, block); 312 bh = sb_bread(sb, block);
314 if (!bh) { 313 if (!bh) {
315 printk(KERN_ERR "hfs: unable to read volume bitmap\n"); 314 pr_err("unable to read volume bitmap\n");
316 break; 315 break;
317 } 316 }
318 len = min((int)sb->s_blocksize - off, size); 317 len = min((int)sb->s_blocksize - off, size);