aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cachefiles/internal.h')
-rw-r--r--fs/cachefiles/internal.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/fs/cachefiles/internal.h b/fs/cachefiles/internal.h
index 5349473df1b1..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, ...) printk(KERN_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)
@@ -310,8 +316,8 @@ do { \
310#define ASSERT(X) \ 316#define ASSERT(X) \
311do { \ 317do { \
312 if (unlikely(!(X))) { \ 318 if (unlikely(!(X))) { \
313 printk(KERN_ERR "\n"); \ 319 pr_err("\n"); \
314 printk(KERN_ERR "CacheFiles: Assertion failed\n"); \ 320 pr_err("Assertion failed\n"); \
315 BUG(); \ 321 BUG(); \
316 } \ 322 } \
317} while (0) 323} while (0)
@@ -319,9 +325,9 @@ do { \
319#define ASSERTCMP(X, OP, Y) \ 325#define ASSERTCMP(X, OP, Y) \
320do { \ 326do { \
321 if (unlikely(!((X) OP (Y)))) { \ 327 if (unlikely(!((X) OP (Y)))) { \
322 printk(KERN_ERR "\n"); \ 328 pr_err("\n"); \
323 printk(KERN_ERR "CacheFiles: Assertion failed\n"); \ 329 pr_err("Assertion failed\n"); \
324 printk(KERN_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(); \
327 } \ 333 } \
@@ -330,8 +336,8 @@ do { \
330#define ASSERTIF(C, X) \ 336#define ASSERTIF(C, X) \
331do { \ 337do { \
332 if (unlikely((C) && !(X))) { \ 338 if (unlikely((C) && !(X))) { \
333 printk(KERN_ERR "\n"); \ 339 pr_err("\n"); \
334 printk(KERN_ERR "CacheFiles: Assertion failed\n"); \ 340 pr_err("Assertion failed\n"); \
335 BUG(); \ 341 BUG(); \
336 } \ 342 } \
337} while (0) 343} while (0)
@@ -339,9 +345,9 @@ do { \
339#define ASSERTIFCMP(C, X, OP, Y) \ 345#define ASSERTIFCMP(C, X, OP, Y) \
340do { \ 346do { \
341 if (unlikely((C) && !((X) OP (Y)))) { \ 347 if (unlikely((C) && !((X) OP (Y)))) { \
342 printk(KERN_ERR "\n"); \ 348 pr_err("\n"); \
343 printk(KERN_ERR "CacheFiles: Assertion failed\n"); \ 349 pr_err("Assertion failed\n"); \
344 printk(KERN_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(); \
347 } \ 353 } \