aboutsummaryrefslogtreecommitdiffstats
path: root/fs/efs/super.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-04 19:12:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:54:20 -0400
commitf403d1dbac6d1ef28f553f3996d5bb5cea90ce15 (patch)
tree08e96ff86dcaf465b8e2ce4c27158b211f789188 /fs/efs/super.c
parent179b87fb186b524ec75a5d54c0d7f25e8d559415 (diff)
fs/efs: add pr_fmt / use __func__
Also uniformize function arguments. Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/efs/super.c')
-rw-r--r--fs/efs/super.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/fs/efs/super.c b/fs/efs/super.c
index 059023226d55..cd1399e5fc83 100644
--- a/fs/efs/super.c
+++ b/fs/efs/super.c
@@ -134,7 +134,7 @@ static const struct export_operations efs_export_ops = {
134 134
135static int __init init_efs_fs(void) { 135static int __init init_efs_fs(void) {
136 int err; 136 int err;
137 pr_info("EFS: "EFS_VERSION" - http://aeschi.ch.eu.org/efs/\n"); 137 pr_info(EFS_VERSION" - http://aeschi.ch.eu.org/efs/\n");
138 err = init_inodecache(); 138 err = init_inodecache();
139 if (err) 139 if (err)
140 goto out1; 140 goto out1;
@@ -179,7 +179,7 @@ static efs_block_t efs_validate_vh(struct volume_header *vh) {
179 csum += be32_to_cpu(cs); 179 csum += be32_to_cpu(cs);
180 } 180 }
181 if (csum) { 181 if (csum) {
182 pr_warn("EFS: SGI disklabel: checksum bad, label corrupted\n"); 182 pr_warn("SGI disklabel: checksum bad, label corrupted\n");
183 return 0; 183 return 0;
184 } 184 }
185 185
@@ -226,10 +226,10 @@ static efs_block_t efs_validate_vh(struct volume_header *vh) {
226 } 226 }
227 227
228 if (slice == -1) { 228 if (slice == -1) {
229 pr_notice("EFS: partition table contained no EFS partitions\n"); 229 pr_notice("partition table contained no EFS partitions\n");
230#ifdef DEBUG 230#ifdef DEBUG
231 } else { 231 } else {
232 pr_info("EFS: using slice %d (type %s, offset 0x%x)\n", slice, 232 pr_info("using slice %d (type %s, offset 0x%x)\n", slice,
233 (pt_entry->pt_name) ? pt_entry->pt_name : "unknown", 233 (pt_entry->pt_name) ? pt_entry->pt_name : "unknown",
234 sblock); 234 sblock);
235#endif 235#endif
@@ -267,7 +267,7 @@ static int efs_fill_super(struct super_block *s, void *d, int silent)
267 267
268 s->s_magic = EFS_SUPER_MAGIC; 268 s->s_magic = EFS_SUPER_MAGIC;
269 if (!sb_set_blocksize(s, EFS_BLOCKSIZE)) { 269 if (!sb_set_blocksize(s, EFS_BLOCKSIZE)) {
270 pr_err("EFS: device does not support %d byte blocks\n", 270 pr_err("device does not support %d byte blocks\n",
271 EFS_BLOCKSIZE); 271 EFS_BLOCKSIZE);
272 return -EINVAL; 272 return -EINVAL;
273 } 273 }
@@ -276,7 +276,7 @@ static int efs_fill_super(struct super_block *s, void *d, int silent)
276 bh = sb_bread(s, 0); 276 bh = sb_bread(s, 0);
277 277
278 if (!bh) { 278 if (!bh) {
279 pr_err("EFS: cannot read volume header\n"); 279 pr_err("cannot read volume header\n");
280 return -EINVAL; 280 return -EINVAL;
281 } 281 }
282 282
@@ -294,13 +294,14 @@ static int efs_fill_super(struct super_block *s, void *d, int silent)
294 294
295 bh = sb_bread(s, sb->fs_start + EFS_SUPER); 295 bh = sb_bread(s, sb->fs_start + EFS_SUPER);
296 if (!bh) { 296 if (!bh) {
297 pr_err("EFS: cannot read superblock\n"); 297 pr_err("cannot read superblock\n");
298 return -EINVAL; 298 return -EINVAL;
299 } 299 }
300 300
301 if (efs_validate_super(sb, (struct efs_super *) bh->b_data)) { 301 if (efs_validate_super(sb, (struct efs_super *) bh->b_data)) {
302#ifdef DEBUG 302#ifdef DEBUG
303 pr_warn("EFS: invalid superblock at block %u\n", sb->fs_start + EFS_SUPER); 303 pr_warn("invalid superblock at block %u\n",
304 sb->fs_start + EFS_SUPER);
304#endif 305#endif
305 brelse(bh); 306 brelse(bh);
306 return -EINVAL; 307 return -EINVAL;
@@ -309,7 +310,7 @@ static int efs_fill_super(struct super_block *s, void *d, int silent)
309 310
310 if (!(s->s_flags & MS_RDONLY)) { 311 if (!(s->s_flags & MS_RDONLY)) {
311#ifdef DEBUG 312#ifdef DEBUG
312 pr_info("EFS: forcing read-only mode\n"); 313 pr_info("forcing read-only mode\n");
313#endif 314#endif
314 s->s_flags |= MS_RDONLY; 315 s->s_flags |= MS_RDONLY;
315 } 316 }
@@ -317,13 +318,13 @@ static int efs_fill_super(struct super_block *s, void *d, int silent)
317 s->s_export_op = &efs_export_ops; 318 s->s_export_op = &efs_export_ops;
318 root = efs_iget(s, EFS_ROOTINODE); 319 root = efs_iget(s, EFS_ROOTINODE);
319 if (IS_ERR(root)) { 320 if (IS_ERR(root)) {
320 pr_err("EFS: get root inode failed\n"); 321 pr_err("get root inode failed\n");
321 return PTR_ERR(root); 322 return PTR_ERR(root);
322 } 323 }
323 324
324 s->s_root = d_make_root(root); 325 s->s_root = d_make_root(root);
325 if (!(s->s_root)) { 326 if (!(s->s_root)) {
326 pr_err("EFS: get root dentry failed\n"); 327 pr_err("get root dentry failed\n");
327 return -ENOMEM; 328 return -ENOMEM;
328 } 329 }
329 330