From 9ae14e8e9042b27b16b2ea793ee3f3c2e18c4599 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Fri, 18 Nov 2011 13:49:00 -0800 Subject: [PATCH] --- yaml --- r: 279759 b: refs/heads/master c: 2174f6df7891fa331800beb72634c969f017900b h: refs/heads/master i: 279757: e21c9ce76ce9b9fca278073da1ba0d6f570fcc00 279755: 15590b1f298d88cdbd10bb225098e83cea21d256 279751: 8e08cffd5f1550b3a487562b61c1c7c450be6876 279743: 2333edebaa8eaf3a8c6b8077061fd3396212d95b v: v3 --- [refs] | 2 +- trunk/fs/pstore/inode.c | 3 ++- trunk/fs/pstore/platform.c | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 0d9202f9f629..3b192bf197dd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3d6d8d20ec4fd3b256632edb373a9c504724b8a9 +refs/heads/master: 2174f6df7891fa331800beb72634c969f017900b diff --git a/trunk/fs/pstore/inode.c b/trunk/fs/pstore/inode.c index 379a02dc1217..b3b426edb2fd 100644 --- a/trunk/fs/pstore/inode.c +++ b/trunk/fs/pstore/inode.c @@ -80,7 +80,8 @@ static int pstore_unlink(struct inode *dir, struct dentry *dentry) { struct pstore_private *p = dentry->d_inode->i_private; - p->psi->erase(p->type, p->id, p->psi); + if (p->psi->erase) + p->psi->erase(p->type, p->id, p->psi); return simple_unlink(dir, dentry); } diff --git a/trunk/fs/pstore/platform.c b/trunk/fs/pstore/platform.c index f146d89179bf..9ec22d3b4293 100644 --- a/trunk/fs/pstore/platform.c +++ b/trunk/fs/pstore/platform.c @@ -207,8 +207,7 @@ void pstore_get_records(int quiet) return; mutex_lock(&psi->read_mutex); - rc = psi->open(psi); - if (rc) + if (psi->open && psi->open(psi)) goto out; while ((size = psi->read(&id, &type, &time, &buf, psi)) > 0) { @@ -219,7 +218,8 @@ void pstore_get_records(int quiet) if (rc && (rc != -EEXIST || !quiet)) failed++; } - psi->close(psi); + if (psi->close) + psi->close(psi); out: mutex_unlock(&psi->read_mutex);