diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-12-21 06:16:49 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-02-07 20:48:35 +0100 |
commit | cc3c0b533ab9142eac2e291628fbfca3685f38cd (patch) | |
tree | 1e030853f8a0bed9225eb392a4faad4f24477fb5 /fs/fs_context.c | |
parent | ceph_parse_param(), ceph_parse_mon_ips(): switch to passing fc_log (diff) | |
download | linux-cc3c0b533ab9142eac2e291628fbfca3685f38cd.tar.xz linux-cc3c0b533ab9142eac2e291628fbfca3685f38cd.zip |
add prefix to fs_context->log
... turning it into struct p_log embedded into fs_context. Initialize
the prefix with fs_type->name, turning fs_parse() into a trivial
inline wrapper for __fs_parse().
This makes fs_parameter_description->name completely unused.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fs_context.c')
-rw-r--r-- | fs/fs_context.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/fs_context.c b/fs/fs_context.c index fb6329c21384..fc9f6ef93b55 100644 --- a/fs/fs_context.c +++ b/fs/fs_context.c @@ -271,6 +271,7 @@ static struct fs_context *alloc_fs_context(struct file_system_type *fs_type, fc->fs_type = get_filesystem(fs_type); fc->cred = get_current_cred(); fc->net_ns = get_net(current->nsproxy->net_ns); + fc->log.prefix = fs_type->name; mutex_init(&fc->uapi_mutex); @@ -364,8 +365,8 @@ struct fs_context *vfs_dup_fs_context(struct fs_context *src_fc) get_net(fc->net_ns); get_user_ns(fc->user_ns); get_cred(fc->cred); - if (fc->log) - refcount_inc(&fc->log->usage); + if (fc->log.log) + refcount_inc(&fc->log.log->usage); /* Can't call put until we've called ->dup */ ret = fc->ops->dup(fc, src_fc); @@ -442,12 +443,12 @@ EXPORT_SYMBOL(logfc); */ static void put_fc_log(struct fs_context *fc) { - struct fc_log *log = fc->log; + struct fc_log *log = fc->log.log; int i; if (log) { if (refcount_dec_and_test(&log->usage)) { - fc->log = NULL; + fc->log.log = NULL; for (i = 0; i <= 7; i++) if (log->need_free & (1 << i)) kfree(log->buffer[i]); |