Whamcloud - gitweb
LU-13817 quota: print error when pool is absent
[fs/lustre-release.git] / contrib / scripts / crypto_patches / 0014_cdebug.patch
1 Make llcrypt_msg use CDEBUG.
2
3 --- a/libcfs/libcfs/crypto/crypto.c
4 +++ b/libcfs/libcfs/crypto/crypto.c
5 @@ -451,7 +451,7 @@ fail:
6         return res;
7  }
8  
9 -void llcrypt_msg(const struct inode *inode, const char *level,
10 +void llcrypt_msg(const struct inode *inode, int mask,
11                  const char *fmt, ...)
12  {
13         static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL,
14 @@ -466,10 +466,10 @@ void llcrypt_msg(const struct inode *ino
15         vaf.fmt = fmt;
16         vaf.va = &args;
17         if (inode)
18 -               printk("%sllcrypt (%s, inode %lu): %pV\n",
19 -                      level, inode->i_sb->s_id, inode->i_ino, &vaf);
20 +               CDEBUG(mask, "llcrypt (%s, inode %lu): %pV\n",
21 +                      inode->i_sb->s_id, inode->i_ino, &vaf);
22         else
23 -               printk("%sllcrypt: %pV\n", level, &vaf);
24 +               CDEBUG(mask, "llcrypt: %pV\n", &vaf);
25         va_end(args);
26  }
27  
28 --- a/libcfs/libcfs/crypto/llcrypt_private.h
29 +++ b/libcfs/libcfs/crypto/llcrypt_private.h
30 @@ -249,12 +249,12 @@ extern struct page *llcrypt_alloc_bounce
31  extern const struct dentry_operations llcrypt_d_ops;
32  
33  extern void __printf(3, 4) __cold
34 -llcrypt_msg(const struct inode *inode, const char *level, const char *fmt, ...);
35 +llcrypt_msg(const struct inode *inode, int mask, const char *fmt, ...);
36  
37  #define llcrypt_warn(inode, fmt, ...)          \
38 -       llcrypt_msg((inode), KERN_WARNING, fmt, ##__VA_ARGS__)
39 +       llcrypt_msg((inode), D_SEC, fmt, ##__VA_ARGS__)
40  #define llcrypt_err(inode, fmt, ...)           \
41 -       llcrypt_msg((inode), KERN_ERR, fmt, ##__VA_ARGS__)
42 +       llcrypt_msg((inode), D_ERROR, fmt, ##__VA_ARGS__)
43  
44  #define LLCRYPT_MAX_IV_SIZE    32
45