diff options
author | Kees Cook <keescook@chromium.org> | 2017-03-05 00:56:38 -0800 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-03-07 14:01:01 -0800 |
commit | fdd0311863b32b42bb2c54e60c987bbbabc0c430 (patch) | |
tree | db38dec895d060edecc9921db07bf71f961fb860 /fs/pstore/ram.c | |
parent | b10b471145f28c219d9ddcc309a67e053776865a (diff) |
pstore: Replace arguments for write_buf_user() API
Removes argument list in favor of pstore record, though the user buffer
remains passed separately since it must carry the __user annotation.
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/pstore/ram.c')
-rw-r--r-- | fs/pstore/ram.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index a7cdde60b1f9..d85e1adae1b6 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -451,19 +451,15 @@ static int notrace ramoops_pstore_write_buf(struct pstore_record *record) return 0; } -static int notrace ramoops_pstore_write_buf_user(enum pstore_type_id type, - enum kmsg_dump_reason reason, - u64 *id, unsigned int part, - const char __user *buf, - bool compressed, size_t size, - struct pstore_info *psi) +static int notrace ramoops_pstore_write_buf_user(struct pstore_record *record, + const char __user *buf) { - if (type == PSTORE_TYPE_PMSG) { - struct ramoops_context *cxt = psi->data; + if (record->type == PSTORE_TYPE_PMSG) { + struct ramoops_context *cxt = record->psi->data; if (!cxt->mprz) return -ENOMEM; - return persistent_ram_write_user(cxt->mprz, buf, size); + return persistent_ram_write_user(cxt->mprz, buf, record->size); } return -EINVAL; |