linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manish Sharma <manishrma@gmail.com>
To: Phillip Lougher <phillip@squashfs.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernelnewbies@kernelnewbies.org,
	Manish Sharma <manishrma@gmail.com>
Subject: [PATCH 1/1] Squashfs-Optimized-uncompressed-buffer-loop-v3
Date: Wed,  4 Sep 2013 22:31:23 +0530	[thread overview]
Message-ID: <1378314083-3677-1-git-send-email-manishrma@gmail.com> (raw)


Signed-off-by: Manish Sharma <manishrma@gmail.com>
---
 fs/squashfs/block.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/fs/squashfs/block.c b/fs/squashfs/block.c
index fb50652..41d108e 100644
--- a/fs/squashfs/block.c
+++ b/fs/squashfs/block.c
@@ -167,17 +167,14 @@ int squashfs_read_data(struct super_block *sb, void **buffer, u64 index,
		/*
		 * Block is uncompressed.
		 */
-		int i, in, pg_offset = 0;
-
-		for (i = 0; i < b; i++) {
-			wait_on_buffer(bh[i]);
-			if (!buffer_uptodate(bh[i]))
-				goto block_release;
-		}
+		int in, pg_offset = 0;

		for (bytes = length; k < b; k++) {
			in = min(bytes, msblk->devblksize - offset);
			bytes -= in;
+			wait_on_buffer(bh[k]);
+			if (!buffer_uptodate(bh[k]))
+				goto block_release;
			while (in) {
				if (pg_offset == PAGE_CACHE_SIZE) {
					page++;
--
1.7.9.5

                 reply	other threads:[~2013-09-04 17:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1378314083-3677-1-git-send-email-manishrma@gmail.com \
    --to=manishrma@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillip@squashfs.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).