summaryrefslogtreecommitdiffstats
path: root/fs/pstore/inode.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-03-05 08:31:19 +0100
committerKees Cook <keescook@chromium.org>2017-03-07 23:01:00 +0100
commita61072aae693ba08390f92eed1dd0573fa5c3cd9 (patch)
treef0e5084369f55c2b8f0365dfaf3ef1e582754803 /fs/pstore/inode.c
parentpstore: Do not duplicate record metadata (diff)
downloadlinux-a61072aae693ba08390f92eed1dd0573fa5c3cd9.tar.xz
linux-a61072aae693ba08390f92eed1dd0573fa5c3cd9.zip
pstore: Replace arguments for erase() API
This removes the argument list for the erase() callback and replaces it with a pointer to the backend record details to be removed. Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/pstore/inode.c')
-rw-r--r--fs/pstore/inode.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index 0ea281b457fa..06504b69575b 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -210,14 +210,12 @@ static int pstore_unlink(struct inode *dir, struct dentry *dentry)
if (err)
return err;
- if (record->psi->erase) {
- mutex_lock(&record->psi->read_mutex);
- record->psi->erase(record->type, record->id, record->count,
- d_inode(dentry)->i_ctime, record->psi);
- mutex_unlock(&record->psi->read_mutex);
- } else {
+ if (!record->psi->erase)
return -EPERM;
- }
+
+ mutex_lock(&record->psi->read_mutex);
+ record->psi->erase(record);
+ mutex_unlock(&record->psi->read_mutex);
return simple_unlink(dir, dentry);
}