summaryrefslogtreecommitdiff
path: root/fs/cachefiles/internal.h
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-07 01:37:33 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-07 03:08:14 +0400
commit0227d6abb378454e10d385da6a0f8b79a5b02c27 (patch)
treee85a3019e054d8cbbaa20f0b98a30653a0432701 /fs/cachefiles/internal.h
parent4e1eb88305135248ad0e927449e457df95d8d9b3 (diff)
downloadlinux-0227d6abb378454e10d385da6a0f8b79a5b02c27.tar.xz
fs/cachefiles: replace kerror by pr_err
Also add pr_fmt in internal.h Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/cachefiles/internal.h')
-rw-r--r--fs/cachefiles/internal.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/fs/cachefiles/internal.h b/fs/cachefiles/internal.h
index 5c7ec647e44c..3d50998abf57 100644
--- a/fs/cachefiles/internal.h
+++ b/fs/cachefiles/internal.h
@@ -9,6 +9,13 @@
* 2 of the Licence, or (at your option) any later version.
*/
+#ifdef pr_fmt
+#undef pr_fmt
+#endif
+
+#define pr_fmt(fmt) "CacheFiles: " fmt
+
+
#include <linux/fscache-cache.h>
#include <linux/timer.h>
#include <linux/wait.h>
@@ -245,11 +252,10 @@ extern int cachefiles_remove_object_xattr(struct cachefiles_cache *cache,
/*
* error handling
*/
-#define kerror(FMT, ...) pr_err("CacheFiles: "FMT"\n", ##__VA_ARGS__)
#define cachefiles_io_error(___cache, FMT, ...) \
do { \
- kerror("I/O Error: " FMT, ##__VA_ARGS__); \
+ pr_err("I/O Error: " FMT, ##__VA_ARGS__); \
fscache_io_error(&(___cache)->cache); \
set_bit(CACHEFILES_DEAD, &(___cache)->flags); \
} while (0)
@@ -311,7 +317,7 @@ do { \
do { \
if (unlikely(!(X))) { \
pr_err("\n"); \
- pr_err("CacheFiles: Assertion failed\n"); \
+ pr_err("Assertion failed\n"); \
BUG(); \
} \
} while (0)
@@ -320,7 +326,7 @@ do { \
do { \
if (unlikely(!((X) OP (Y)))) { \
pr_err("\n"); \
- pr_err("CacheFiles: Assertion failed\n"); \
+ pr_err("Assertion failed\n"); \
pr_err("%lx " #OP " %lx is false\n", \
(unsigned long)(X), (unsigned long)(Y)); \
BUG(); \
@@ -331,7 +337,7 @@ do { \
do { \
if (unlikely((C) && !(X))) { \
pr_err("\n"); \
- pr_err("CacheFiles: Assertion failed\n"); \
+ pr_err("Assertion failed\n"); \
BUG(); \
} \
} while (0)
@@ -340,7 +346,7 @@ do { \
do { \
if (unlikely((C) && !((X) OP (Y)))) { \
pr_err("\n"); \
- pr_err("CacheFiles: Assertion failed\n"); \
+ pr_err("Assertion failed\n"); \
pr_err("%lx " #OP " %lx is false\n", \
(unsigned long)(X), (unsigned long)(Y)); \
BUG(); \