public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Manish Katiyar <mkatiyar@gmail.com>
Cc: Theodore Ts'o <tytso@mit.edu>, ext4 <linux-ext4@vger.kernel.org>,
	cmm@us.ibm.com
Subject: Re: [PATCH] ext2: Mark the buffer as unmapped before reading the next quota block
Date: Mon, 2 Feb 2009 11:34:29 +0100	[thread overview]
Message-ID: <20090202103429.GB7145@duck.suse.cz> (raw)
In-Reply-To: <ea11fea30902020204t7a2db3a7tbf3f0b8d22b20cce@mail.gmail.com>

On Mon 02-02-09 15:34:27, Manish Katiyar wrote:
> Hi Jan,
> 
> This is in continuation with the previous patch
> (http://patchwork.ozlabs.org/patch/20275/) . We also need to set the
> buffer as unmapped before reading the next block. I don't think quota
> files can have holes, but atleast for correctness, otherwise once we
> have read a block, tmp_bh is always mapped even for holes.
> 
> 
> Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
> ---
>  fs/ext2/super.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ext2/super.c b/fs/ext2/super.c
> index da8bdea..b4e7633 100644
> --- a/fs/ext2/super.c
> +++ b/fs/ext2/super.c
> @@ -1328,6 +1328,7 @@ static ssize_t ext2_quota_read(struct
> super_block *sb, int type, char *data,
>  				sb->s_blocksize - offset : toread;
> 
>  		tmp_bh.b_state = 0;
> +		clear_buffer_mapped(&tmp_bh);
  I don't get this. When b_state is 0, then in particuler the buffer is not
mapped. So why clear the mapped bit explicitely?

>  		err = ext2_get_block(inode, blk, &tmp_bh, 0);
>  		if (err < 0)
>  			return err;

									Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  reply	other threads:[~2009-02-02 10:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-02 10:04 [PATCH] ext2: Mark the buffer as unmapped before reading the next quota block Manish Katiyar
2009-02-02 10:34 ` Jan Kara [this message]
2009-02-02 11:05   ` Manish Katiyar

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=20090202103429.GB7145@duck.suse.cz \
    --to=jack@suse.cz \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=mkatiyar@gmail.com \
    --cc=tytso@mit.edu \
    /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