diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-20 16:39:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-20 16:39:00 -0400 |
commit | 8e7bfcbab3825d1b404d615cb1b54f44ff81f981 (patch) | |
tree | 5465eeb9c58af8dd8a26466c61de69b4b1df89dc /fs | |
parent | 102dc1bae12a20214c9ee2d33a7402dc5175e30d (diff) | |
parent | 30f7276cb35a22743d709a460ae3639aad50366a (diff) |
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.c | 12 |
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); | |||
152 | void pstore_get_records(void) | 152 | void pstore_get_records(void) |
153 | { | 153 | { |
154 | struct pstore_info *psi = psinfo; | 154 | struct pstore_info *psi = psinfo; |
155 | size_t size; | 155 | ssize_t size; |
156 | u64 id; | 156 | u64 id; |
157 | enum pstore_type_id type; | 157 | enum pstore_type_id type; |
158 | struct timespec time; | 158 | struct timespec time; |
159 | int failed = 0; | 159 | int failed = 0, rc; |
160 | 160 | ||
161 | if (!psi) | 161 | if (!psi) |
162 | return; | 162 | return; |
163 | 163 | ||
164 | mutex_lock(&psinfo->buf_mutex); | 164 | mutex_lock(&psinfo->buf_mutex); |
165 | rc = psi->open(psi); | ||
166 | if (rc) | ||
167 | goto out; | ||
168 | |||
165 | while ((size = psi->read(&id, &type, &time)) > 0) { | 169 | while ((size = psi->read(&id, &type, &time)) > 0) { |
166 | if (pstore_mkfile(type, psi->name, id, psi->buf, size, | 170 | if (pstore_mkfile(type, psi->name, id, psi->buf, (size_t)size, |
167 | time, psi->erase)) | 171 | time, psi->erase)) |
168 | failed++; | 172 | failed++; |
169 | } | 173 | } |
174 | psi->close(psi); | ||
175 | out: | ||
170 | mutex_unlock(&psinfo->buf_mutex); | 176 | mutex_unlock(&psinfo->buf_mutex); |
171 | 177 | ||
172 | if (failed) | 178 | if (failed) |