summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-20 13:39:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-20 13:39:00 -0700
commit8e7bfcbab3825d1b404d615cb1b54f44ff81f981 (patch)
tree5465eeb9c58af8dd8a26466c61de69b4b1df89dc /fs
parent102dc1bae12a20214c9ee2d33a7402dc5175e30d (diff)
parent30f7276cb35a22743d709a460ae3639aad50366a (diff)
downloadlinux-3.10-8e7bfcbab3825d1b404d615cb1b54f44ff81f981.tar.gz
linux-3.10-8e7bfcbab3825d1b404d615cb1b54f44ff81f981.tar.bz2
linux-3.10-8e7bfcbab3825d1b404d615cb1b54f44ff81f981.zip
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] define "_sdata" symbol pstore: Fix Kconfig dependencies for apei->pstore pstore: fix potential logic issue in pstore read interface pstore: fix pstore filesystem mount/remount issue pstore: fix one type of return value in pstore [IA64] fix build warning in arch/ia64/oprofile/backtrace.c
Diffstat (limited to 'fs')
-rw-r--r--fs/pstore/platform.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index f835a25625f..f2c3ff20ea6 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -152,21 +152,27 @@ EXPORT_SYMBOL_GPL(pstore_register);
void pstore_get_records(void)
{
struct pstore_info *psi = psinfo;
- size_t size;
+ ssize_t size;
u64 id;
enum pstore_type_id type;
struct timespec time;
- int failed = 0;
+ int failed = 0, rc;
if (!psi)
return;
mutex_lock(&psinfo->buf_mutex);
+ rc = psi->open(psi);
+ if (rc)
+ goto out;
+
while ((size = psi->read(&id, &type, &time)) > 0) {
- if (pstore_mkfile(type, psi->name, id, psi->buf, size,
+ if (pstore_mkfile(type, psi->name, id, psi->buf, (size_t)size,
time, psi->erase))
failed++;
}
+ psi->close(psi);
+out:
mutex_unlock(&psinfo->buf_mutex);
if (failed)