mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 1/6] fat: add i_disksize to represent uninitialized size
Date: Tue, 18 Mar 2014 23:40:52 +0900	[thread overview]
Message-ID: <87iorb4ljf.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <1393769327-3472-1-git-send-email-linkinjeon@gmail.com> (Namjae Jeon's message of "Sun, 2 Mar 2014 23:08:47 +0900")

Namjae Jeon <linkinjeon@gmail.com> writes:

> diff --git a/fs/fat/file.c b/fs/fat/file.c
> index 9b104f5..0bf0d28 100644
> --- a/fs/fat/file.c
> +++ b/fs/fat/file.c
> @@ -300,8 +300,10 @@ void fat_truncate_blocks(struct inode *inode, loff_t offset)
>  	 * This protects against truncating a file bigger than it was then
>  	 * trying to write into the hole.
>  	 */
> -	if (MSDOS_I(inode)->mmu_private > offset)
> +	if (MSDOS_I(inode)->i_disksize > offset) {
>  		MSDOS_I(inode)->mmu_private = offset;
> +		MSDOS_I(inode)->i_disksize = offset;

like inode initialization, we would need to set i_disksize to block boundary?

> +	}
>  
>  	nr_clusters = (offset + (cluster_size - 1)) >> sbi->cluster_bits;
>  
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

      reply	other threads:[~2014-03-18 14:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-02 14:08 Namjae Jeon
2014-03-18 14:40 ` OGAWA Hirofumi [this message]

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=87iorb4ljf.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®