ceph: include the initial ACL in create/mkdir/mknod MDS requests
[firefly-linux-kernel-4.4.55.git] / fs / cachefiles / internal.h
index 5349473df1b1ff5b900f5eca7a8b1786669b5b0c..8c52472d2efa4ec745821e52d9deaa14bd440515 100644 (file)
@@ -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, ...) printk(KERN_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"\n", ##__VA_ARGS__);   \
        fscache_io_error(&(___cache)->cache);           \
        set_bit(CACHEFILES_DEAD, &(___cache)->flags);   \
 } while (0)
@@ -310,8 +316,8 @@ do {                                                        \
 #define ASSERT(X)                                                      \
 do {                                                                   \
        if (unlikely(!(X))) {                                           \
-               printk(KERN_ERR "\n");                                  \
-               printk(KERN_ERR "CacheFiles: Assertion failed\n");      \
+               pr_err("\n");                                           \
+               pr_err("Assertion failed\n");           \
                BUG();                                                  \
        }                                                               \
 } while (0)
@@ -319,9 +325,9 @@ do {                                                                        \
 #define ASSERTCMP(X, OP, Y)                                            \
 do {                                                                   \
        if (unlikely(!((X) OP (Y)))) {                                  \
-               printk(KERN_ERR "\n");                                  \
-               printk(KERN_ERR "CacheFiles: Assertion failed\n");      \
-               printk(KERN_ERR "%lx " #OP " %lx is false\n",           \
+               pr_err("\n");                                           \
+               pr_err("Assertion failed\n");           \
+               pr_err("%lx " #OP " %lx is false\n",                    \
                       (unsigned long)(X), (unsigned long)(Y));         \
                BUG();                                                  \
        }                                                               \
@@ -330,8 +336,8 @@ do {                                                                        \
 #define ASSERTIF(C, X)                                                 \
 do {                                                                   \
        if (unlikely((C) && !(X))) {                                    \
-               printk(KERN_ERR "\n");                                  \
-               printk(KERN_ERR "CacheFiles: Assertion failed\n");      \
+               pr_err("\n");                                           \
+               pr_err("Assertion failed\n");           \
                BUG();                                                  \
        }                                                               \
 } while (0)
@@ -339,9 +345,9 @@ do {                                                                        \
 #define ASSERTIFCMP(C, X, OP, Y)                                       \
 do {                                                                   \
        if (unlikely((C) && !((X) OP (Y)))) {                           \
-               printk(KERN_ERR "\n");                                  \
-               printk(KERN_ERR "CacheFiles: Assertion failed\n");      \
-               printk(KERN_ERR "%lx " #OP " %lx is false\n",           \
+               pr_err("\n");                                           \
+               pr_err("Assertion failed\n");           \
+               pr_err("%lx " #OP " %lx is false\n",                    \
                       (unsigned long)(X), (unsigned long)(Y));         \
                BUG();                                                  \
        }                                                               \