diff options
author | Kees Cook <keescook@chromium.org> | 2017-03-05 08:31:19 +0100 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-03-07 23:01:00 +0100 |
commit | a61072aae693ba08390f92eed1dd0573fa5c3cd9 (patch) | |
tree | f0e5084369f55c2b8f0365dfaf3ef1e582754803 /fs/pstore/inode.c | |
parent | pstore: Do not duplicate record metadata (diff) | |
download | linux-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.c | 12 |
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); } |