diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-12-21 07:52:55 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-02-07 22:48:34 +0300 |
commit | 7f5d38141e309bb4ba995d9726928af85a299c50 (patch) | |
tree | 06400fc56ab3282c8a137b8655d1dba7eb5925d5 /include | |
parent | 2c3f3dc315565941262e980029c0f74ad118231a (diff) | |
download | linux-7f5d38141e309bb4ba995d9726928af85a299c50.tar.xz |
new primitive: __fs_parse()
fs_parse() analogue taking p_log instead of fs_context.
fs_parse() turned into a wrapper, callers in ceph_common and rbd
switched to __fs_parse().
As the result, fs_parse() never gets NULL fs_context and neither
do fs_context-based logging primitives
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs_context.h | 6 | ||||
-rw-r--r-- | include/linux/fs_parser.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/fs_context.h b/include/linux/fs_context.h index 6a7eeb252084..41f37d33e358 100644 --- a/include/linux/fs_context.h +++ b/include/linux/fs_context.h @@ -189,10 +189,8 @@ struct fc_log { extern __attribute__((format(printf, 4, 5))) void logfc(struct fc_log *log, const char *prefix, char level, const char *fmt, ...); -#define __logfc(fc, l, fmt, ...) ({ \ - struct fs_context *__fc = (fc); \ - logfc(__fc ? __fc->log : NULL, NULL, \ - l, fmt, ## __VA_ARGS__);}) +#define __logfc(fc, l, fmt, ...) logfc((fc)->log, NULL, \ + l, fmt, ## __VA_ARGS__) #define __plog(p, l, fmt, ...) logfc((p)->log, (p)->prefix, \ l, fmt, ## __VA_ARGS__) /** diff --git a/include/linux/fs_parser.h b/include/linux/fs_parser.h index 14bdaacf1218..b0fba26a4ffe 100644 --- a/include/linux/fs_parser.h +++ b/include/linux/fs_parser.h @@ -74,6 +74,10 @@ struct fs_parse_result { }; }; +extern int __fs_parse(struct p_log *log, + const struct fs_parameter_description *desc, + struct fs_parameter *value, + struct fs_parse_result *result); extern int fs_parse(struct fs_context *fc, const struct fs_parameter_description *desc, struct fs_parameter *value, |