diff options
author | Kees Cook <keescook@chromium.org> | 2017-03-04 23:12:24 -0800 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-03-07 14:00:59 -0800 |
commit | 83f70f0769ddd8a368cb6346a918102818232962 (patch) | |
tree | c5e0f64fc25986538436a165ad70e81f216dbbbc /fs/pstore/platform.c | |
parent | 2a2b0acf768cfb2a9cf6c3b42b0e0eb25cbb5814 (diff) | |
download | linux-stable-83f70f0769ddd8a368cb6346a918102818232962.tar.gz linux-stable-83f70f0769ddd8a368cb6346a918102818232962.tar.bz2 linux-stable-83f70f0769ddd8a368cb6346a918102818232962.zip |
pstore: Do not duplicate record metadata
This switches the inode-private data from carrying duplicate metadata to
keeping the record passed in during pstore_mkfile().
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/pstore/platform.c')
-rw-r--r-- | fs/pstore/platform.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 072326625629..aa3d6e572ede 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -852,14 +852,12 @@ void pstore_get_records(int quiet) decompress_record(record); rc = pstore_mkfile(record); if (rc) { - /* pstore_mkfile() did not take buf, so free it. */ + /* pstore_mkfile() did not take record, so free it. */ kfree(record->buf); + kfree(record); if (rc != -EEXIST || !quiet) failed++; } - - /* Reset for next record. */ - kfree(record); } if (psi->close) psi->close(psi); |