Skip to content

Commit

Permalink
cifs: make fs_context error logging wrapper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aaptel authored and Steve French committed Apr 25, 2021
1 parent 7fe6fe9 commit 9d4ac8b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fs/cifs/fs_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9d4ac8b

Please sign in to comment.