diff options
author | Aurelien Aptel <aaptel@suse.com> | 2021-03-01 19:25:00 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-04-25 16:28:24 -0500 |
commit | 9d4ac8b6302c60a1949560e501fc1d0b4654b9c6 (patch) | |
tree | 19d653c93a6c819fe428f747d154c941972251b8 /fs/cifs/fs_context.h | |
parent | 7fe6fe95b936084dce6eedcc2cccadf96eafae73 (diff) |
cifs: make fs_context error logging wrapper
This new helper will be used in the fs_context mount option parsing
code. It log errors both in:
* the fs_context log queue for userspace to read
* kernel printk buffer (dmesg, old behaviour)
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/fs_context.h')
-rw-r--r-- | fs/cifs/fs_context.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/cifs/fs_context.h b/fs/cifs/fs_context.h index 87dd1f7168f2..dc0b7c9489f5 100644 --- a/fs/cifs/fs_context.h +++ b/fs/cifs/fs_context.h @@ -13,7 +13,12 @@ #include <linux/parser.h> #include <linux/fs_parser.h> -#define cifs_invalf(fc, fmt, ...) invalf(fc, fmt, ## __VA_ARGS__) +/* Log errors in fs_context (new mount api) but also in dmesg (old style) */ +#define cifs_errorf(fc, fmt, ...) \ + do { \ + errorf(fc, fmt, ## __VA_ARGS__); \ + cifs_dbg(VFS, fmt, ## __VA_ARGS__); \ + } while (0) enum smb_version { Smb_1 = 1, |