Skip to content

Commit

Permalink
Merge tag 'squashfs-fixes' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/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
  • Loading branch information
Linus Torvalds committed Dec 4, 2013
2 parents d644c02 + 6d56540 commit 2787179
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/squashfs/file_direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -119,7 +122,7 @@ int squashfs_readpage_block(struct page *target_page, u64 block, int bsize)
* 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]);
Expand Down

0 comments on commit 2787179

Please sign in to comment.