summaryrefslogtreecommitdiffstats
path: root/fs/cramfs/inode.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-08-08 17:22:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:25 -0400
commit4f21e1ea09e1e337604f235a22ec2493ae1bd1db (patch)
treeaddf15ae5c01d75e2eac5c37af44f574aa941892 /fs/cramfs/inode.c
parentf175ff8100eef0eb4b946c08e78a27bd17ca5896 (diff)
fs/cramfs: use pr_fmt
Use module name for "cramfs: " prefix. (note that uncompress.c printk had no prefix). Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/cramfs/inode.c')
-rw-r--r--fs/cramfs/inode.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index 480fcb8e7d6c..fa5c75978df3 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -11,6 +11,8 @@
11 * The actual compression is based on zlib, see the other files. 11 * The actual compression is based on zlib, see the other files.
12 */ 12 */
13 13
14#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
15
14#include <linux/module.h> 16#include <linux/module.h>
15#include <linux/fs.h> 17#include <linux/fs.h>
16#include <linux/pagemap.h> 18#include <linux/pagemap.h>
@@ -277,7 +279,7 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
277 /* check for wrong endianness */ 279 /* check for wrong endianness */
278 if (super.magic == CRAMFS_MAGIC_WEND) { 280 if (super.magic == CRAMFS_MAGIC_WEND) {
279 if (!silent) 281 if (!silent)
280 pr_err("cramfs: wrong endianness\n"); 282 pr_err("wrong endianness\n");
281 return -EINVAL; 283 return -EINVAL;
282 } 284 }
283 285
@@ -287,22 +289,22 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
287 mutex_unlock(&read_mutex); 289 mutex_unlock(&read_mutex);
288 if (super.magic != CRAMFS_MAGIC) { 290 if (super.magic != CRAMFS_MAGIC) {
289 if (super.magic == CRAMFS_MAGIC_WEND && !silent) 291 if (super.magic == CRAMFS_MAGIC_WEND && !silent)
290 pr_err("cramfs: wrong endianness\n"); 292 pr_err("wrong endianness\n");
291 else if (!silent) 293 else if (!silent)
292 pr_err("cramfs: wrong magic\n"); 294 pr_err("wrong magic\n");
293 return -EINVAL; 295 return -EINVAL;
294 } 296 }
295 } 297 }
296 298
297 /* get feature flags first */ 299 /* get feature flags first */
298 if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) { 300 if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) {
299 pr_err("cramfs: unsupported filesystem features\n"); 301 pr_err("unsupported filesystem features\n");
300 return -EINVAL; 302 return -EINVAL;
301 } 303 }
302 304
303 /* Check that the root inode is in a sane state */ 305 /* Check that the root inode is in a sane state */
304 if (!S_ISDIR(super.root.mode)) { 306 if (!S_ISDIR(super.root.mode)) {
305 pr_err("cramfs: root is not a directory\n"); 307 pr_err("root is not a directory\n");
306 return -EINVAL; 308 return -EINVAL;
307 } 309 }
308 /* correct strange, hard-coded permissions of mkcramfs */ 310 /* correct strange, hard-coded permissions of mkcramfs */
@@ -321,12 +323,12 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
321 sbi->magic=super.magic; 323 sbi->magic=super.magic;
322 sbi->flags=super.flags; 324 sbi->flags=super.flags;
323 if (root_offset == 0) 325 if (root_offset == 0)
324 pr_info("cramfs: empty filesystem"); 326 pr_info("empty filesystem");
325 else if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) && 327 else if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) &&
326 ((root_offset != sizeof(struct cramfs_super)) && 328 ((root_offset != sizeof(struct cramfs_super)) &&
327 (root_offset != 512 + sizeof(struct cramfs_super)))) 329 (root_offset != 512 + sizeof(struct cramfs_super))))
328 { 330 {
329 pr_err("cramfs: bad root offset %lu\n", root_offset); 331 pr_err("bad root offset %lu\n", root_offset);
330 return -EINVAL; 332 return -EINVAL;
331 } 333 }
332 334
@@ -511,7 +513,7 @@ static int cramfs_readpage(struct file *file, struct page * page)
511 if (compr_len == 0) 513 if (compr_len == 0)
512 ; /* hole */ 514 ; /* hole */
513 else if (unlikely(compr_len > (PAGE_CACHE_SIZE << 1))) { 515 else if (unlikely(compr_len > (PAGE_CACHE_SIZE << 1))) {
514 pr_err("cramfs: bad compressed blocksize %u\n", 516 pr_err("bad compressed blocksize %u\n",
515 compr_len); 517 compr_len);
516 goto err; 518 goto err;
517 } else { 519 } else {