mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roman Peniaev <r.peniaev@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/7] Squashfs: Directly decompress into the page cache for file data
Date: Fri, 22 Nov 2013 07:40:32 +0000 (UTC)	[thread overview]
Message-ID: <loom.20131122T083329-218@post.gmane.org> (raw)
In-Reply-To: <1384912091-11092-6-git-send-email-phillip@squashfs.org.uk>

Hello, Phillip.

one remark below:

> 
> +static int squashfs_read_cache(struct page *target_page, u64 block, int 
bsize,
> +	int pages, struct page **page)
> +{
> +	struct inode *i = target_page->mapping->host;
> +	struct squashfs_cache_entry *buffer = squashfs_get_datablock(i-
>i_sb,
> +						 block, bsize);
> +	int bytes = buffer->length, res = buffer->error, n, offset = 0;
> +	void *pageaddr;
> +
> +	if (res) {
> +		ERROR("Unable to read page, block %llx, size %x\n", block,
> +			bsize);
> +		goto out;


have you forgotten to unlock the pages on error path?

in case of error squashfs_readpage will unlock only target page.


> +	}
> +
> +	for (n = 0; n < pages && bytes > 0; n++,
> +			bytes -= PAGE_CACHE_SIZE, offset += 
PAGE_CACHE_SIZE) {
> +		int avail = min_t(int, bytes, PAGE_CACHE_SIZE);



  reply	other threads:[~2013-11-22  7:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20  1:48 [PATCH 1/7] Squashfs: Refactor decompressor interface and code Phillip Lougher
2013-11-20  1:48 ` [PATCH 2/7] squashfs: Enhance parallel I/O Phillip Lougher
2013-11-20  1:48 ` [PATCH 3/7] Squashfs: add multi-threaded decompression using percpu variables (V2) Phillip Lougher
2013-11-20  8:33   ` Minchan Kim
2013-11-20  9:36     ` Phillip Lougher
2013-11-20  1:48 ` [PATCH 4/7] Squashfs: Generalise paging handling in the decompressors Phillip Lougher
2013-11-20  1:48 ` [PATCH 5/7] Squashfs: Restructure squashfs_readpage() Phillip Lougher
2013-11-20  1:48 ` [PATCH 6/7] Squashfs: Directly decompress into the page cache for file data Phillip Lougher
2013-11-22  7:40   ` Roman Peniaev [this message]
2013-11-24  1:19     ` Phillip Lougher
2013-11-20  1:48 ` [PATCH 7/7] Squashfs: Check stream is not NULL in decompressor_multi.c Phillip Lougher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20131122T083329-218@post.gmane.org \
    --to=r.peniaev@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome