From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
Namjae Jeon <namjae.jeon@samsung.com>,
Amit Sahrawat <a.sahrawat@samsung.com>
Subject: Re: [PATCH v4 3/6] fat: zero out seek range on _fat_get_block
Date: Tue, 18 Mar 2014 23:59:14 +0900 [thread overview]
Message-ID: <87a9cn4kot.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <1393769349-3540-1-git-send-email-linkinjeon@gmail.com> (Namjae Jeon's message of "Sun, 2 Mar 2014 23:09:09 +0900")
Namjae Jeon <linkinjeon@gmail.com> writes:
> +static void check_fallocated_region(struct inode *inode, sector_t iblock,
> + unsigned long *max_blocks, struct buffer_head *bh_result)
> +{
> + struct super_block *sb = inode->i_sb;
> + sector_t last_block, disk_block;
> + const unsigned long blocksize = sb->s_blocksize;
> + const unsigned char blocksize_bits = sb->s_blocksize_bits;
> +
> + last_block = (MSDOS_I(inode)->mmu_private + (blocksize - 1))
> + >> blocksize_bits;
> + disk_block = (MSDOS_I(inode)->i_disksize + (blocksize - 1))
> + >> blocksize_bits;
> + if (iblock >= last_block && iblock <= disk_block) {
Maybe off-by-one error. If iblock == disk_block, phys should not be set
by fat_bmap()?
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2014-03-18 14:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-02 14:09 Namjae Jeon
2014-03-18 14:59 ` OGAWA Hirofumi [this message]
2014-03-19 9:40 ` Namjae Jeon
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=87a9cn4kot.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=a.sahrawat@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=linkinjeon@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namjae.jeon@samsung.com \
/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
all inboxes | Powered by JetHome®