diff options
author | Kees Cook <keescook@chromium.org> | 2017-03-05 10:31:19 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-03-08 01:01:00 +0300 |
commit | a61072aae693ba08390f92eed1dd0573fa5c3cd9 (patch) | |
tree | f0e5084369f55c2b8f0365dfaf3ef1e582754803 /fs/pstore/inode.c | |
parent | 83f70f0769ddd8a368cb6346a918102818232962 (diff) | |
download | linux-a61072aae693ba08390f92eed1dd0573fa5c3cd9.tar.xz |
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); } |