aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/internal.h
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-06 17:37:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:08:14 -0400
commit0227d6abb378454e10d385da6a0f8b79a5b02c27 (patch)
treee85a3019e054d8cbbaa20f0b98a30653a0432701 /fs/cachefiles/internal.h
parent4e1eb88305135248ad0e927449e457df95d8d9b3 (diff)
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 @@
9 * 2 of the Licence, or (at your option) any later version. 9 * 2 of the Licence, or (at your option) any later version.
10 */ 10 */
11 11
12#ifdef pr_fmt
13#undef pr_fmt
14#endif
15
16#define pr_fmt(fmt) "CacheFiles: " fmt
17
18
12#include <linux/fscache-cache.h> 19#include <linux/fscache-cache.h>
13#include <linux/timer.h> 20#include <linux/timer.h>
14#include <linux/wait.h> 21#include <linux/wait.h>
@@ -245,11 +252,10 @@ extern int cachefiles_remove_object_xattr(struct cachefiles_cache *cache,
245/* 252/*
246 * error handling 253 * error handling
247 */ 254 */
248#define kerror(FMT, ...) pr_err("CacheFiles: "FMT"\n", ##__VA_ARGS__)
249 255
250#define cachefiles_io_error(___cache, FMT, ...) \ 256#define cachefiles_io_error(___cache, FMT, ...) \
251do { \ 257do { \
252 kerror("I/O Error: " FMT, ##__VA_ARGS__); \ 258 pr_err("I/O Error: " FMT, ##__VA_ARGS__); \
253 fscache_io_error(&(___cache)->cache); \ 259 fscache_io_error(&(___cache)->cache); \
254 set_bit(CACHEFILES_DEAD, &(___cache)->flags); \ 260 set_bit(CACHEFILES_DEAD, &(___cache)->flags); \
255} while (0) 261} while (0)
@@ -311,7 +317,7 @@ do { \
311do { \ 317do { \
312 if (unlikely(!(X))) { \ 318 if (unlikely(!(X))) { \
313 pr_err("\n"); \ 319 pr_err("\n"); \
314 pr_err("CacheFiles: Assertion failed\n"); \ 320 pr_err("Assertion failed\n"); \
315 BUG(); \ 321 BUG(); \
316 } \ 322 } \
317} while (0) 323} while (0)
@@ -320,7 +326,7 @@ do { \
320do { \ 326do { \
321 if (unlikely(!((X) OP (Y)))) { \ 327 if (unlikely(!((X) OP (Y)))) { \
322 pr_err("\n"); \ 328 pr_err("\n"); \
323 pr_err("CacheFiles: Assertion failed\n"); \ 329 pr_err("Assertion failed\n"); \
324 pr_err("%lx " #OP " %lx is false\n", \ 330 pr_err("%lx " #OP " %lx is false\n", \
325 (unsigned long)(X), (unsigned long)(Y)); \ 331 (unsigned long)(X), (unsigned long)(Y)); \
326 BUG(); \ 332 BUG(); \
@@ -331,7 +337,7 @@ do { \
331do { \ 337do { \
332 if (unlikely((C) && !(X))) { \ 338 if (unlikely((C) && !(X))) { \
333 pr_err("\n"); \ 339 pr_err("\n"); \
334 pr_err("CacheFiles: Assertion failed\n"); \ 340 pr_err("Assertion failed\n"); \
335 BUG(); \ 341 BUG(); \
336 } \ 342 } \
337} while (0) 343} while (0)
@@ -340,7 +346,7 @@ do { \
340do { \ 346do { \
341 if (unlikely((C) && !((X) OP (Y)))) { \ 347 if (unlikely((C) && !((X) OP (Y)))) { \
342 pr_err("\n"); \ 348 pr_err("\n"); \
343 pr_err("CacheFiles: Assertion failed\n"); \ 349 pr_err("Assertion failed\n"); \
344 pr_err("%lx " #OP " %lx is false\n", \ 350 pr_err("%lx " #OP " %lx is false\n", \
345 (unsigned long)(X), (unsigned long)(Y)); \ 351 (unsigned long)(X), (unsigned long)(Y)); \
346 BUG(); \ 352 BUG(); \