diff options
author | Rodrigo Freire <rfreire@redhat.com> | 2018-10-07 12:21:25 -0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2018-10-23 21:16:05 -0500 |
commit | 9a0efeccfa7ea6a82585bb2def161de006396b7d (patch) | |
tree | ba746273b4d48672148f0c01ae20905efd380f32 /fs/cifs/cifs_debug.h | |
parent | cifs: OFD locks do not conflict with eachothers (diff) | |
download | wireguard-linux-9a0efeccfa7ea6a82585bb2def161de006396b7d.tar.xz wireguard-linux-9a0efeccfa7ea6a82585bb2def161de006396b7d.zip |
CIFS: Adds information-level logging function
Currently, CIFS lacks a internal logging function that prints out data
when CIFS_DEBUG=n. When CIFS_DEBUG=y, the only message level for CIFS
events are KERN_ERR or KERN_DEBUG.
This patch creates cifs_info(), which is useful for printing
non-critical event messges, at either CIFS_DEBUG state.
Signed-off-by: Rodrigo Freire <rfreire@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifs_debug.h')
-rw-r--r-- | fs/cifs/cifs_debug.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h index f4f3f0853c6e..72db2987e066 100644 --- a/fs/cifs/cifs_debug.h +++ b/fs/cifs/cifs_debug.h @@ -47,6 +47,17 @@ extern int cifsFYI; */ #ifdef CONFIG_CIFS_DEBUG +/* Information level messages, minor events */ +#define cifs_info_func(ratefunc, fmt, ...) \ +do { \ + pr_info_ ## ratefunc("CIFS: " fmt, ##__VA_ARGS__); \ +} while (0) + +#define cifs_info(fmt, ...) \ +do { \ + cifs_info_func(ratelimited, fmt, ##__VA_ARGS__); \ +} while (0) + /* information message: e.g., configuration, major event */ #define cifs_dbg_func(ratefunc, type, fmt, ...) \ do { \ @@ -81,6 +92,11 @@ do { \ if (0) \ pr_debug(fmt, ##__VA_ARGS__); \ } while (0) + +#define cifs_info(fmt, ...) \ +do { \ + pr_info("CIFS: "fmt, ##__VA_ARGS__); \ +} while (0) #endif #endif /* _H_CIFS_DEBUG */ |