summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-12-04 17:54:00 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2013-12-04 17:54:00 +0100
commit278717909d47d86fbb20ab66dfeaa84560a2f8f2 (patch)
tree7de925d78f769331d0ccfb6ce4c10c58c2198ea6 /fs
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 (diff)
parentSquashfs: fix failure to unlock pages on decompress error (diff)
downloadlinux-278717909d47d86fbb20ab66dfeaa84560a2f8f2.tar.xz
linux-278717909d47d86fbb20ab66dfeaa84560a2f8f2.zip
Merge tag 'squashfs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-next
Pull squashfs bugfix from Phillip Lougher: "Just a single bug fix to the new "directly decompress into the page cache" code" * tag 'squashfs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-next: Squashfs: fix failure to unlock pages on decompress error
Diffstat (limited to 'fs')
-rw-r--r--fs/squashfs/file_direct.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/squashfs/file_direct.c b/fs/squashfs/file_direct.c
index 2943b2bfae48..62a0de6632e1 100644
--- a/fs/squashfs/file_direct.c
+++ b/fs/squashfs/file_direct.c
@@ -84,6 +84,9 @@ int squashfs_readpage_block(struct page *target_page, u64 block, int bsize)
*/
res = squashfs_read_cache(target_page, block, bsize, pages,
page);
+ if (res < 0)
+ goto mark_errored;
+
goto out;
}
@@ -119,7 +122,7 @@ mark_errored:
* dealt with by the caller
*/
for (i = 0; i < pages; i++) {
- if (page[i] == target_page)
+ if (page[i] == NULL || page[i] == target_page)
continue;
flush_dcache_page(page[i]);
SetPageError(page[i]);