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, a.sahrawat@samsung.com,
Namjae Jeon <namjae.jeon@samsung.com>
Subject: Re: [PATCH 2/5] fat: add fat_fallocate operation
Date: Sun, 27 Oct 2013 22:50:12 +0900 [thread overview]
Message-ID: <87hac2yga3.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <1381329640-11871-1-git-send-email-linkinjeon@gmail.com> (Namjae Jeon's message of "Wed, 9 Oct 2013 23:40:40 +0900")
Namjae Jeon <linkinjeon@gmail.com> writes:
> diff --git a/fs/fat/inode.c b/fs/fat/inode.c
> index 578a5db..2211489 100644
> --- a/fs/fat/inode.c
> +++ b/fs/fat/inode.c
> @@ -491,6 +491,13 @@ EXPORT_SYMBOL_GPL(fat_build_inode);
>
> static void fat_evict_inode(struct inode *inode)
> {
> + struct super_block *sb = inode->i_sb;
> +
> + /* Release unwritten fallocated blocks on file release. */
> + if (round_up(inode->i_size, sb->s_blocksize) <
> + MSDOS_I(inode)->i_disksize && inode->i_nlink != 0)
> + fat_truncate_blocks(inode, inode->i_size);
> +
> truncate_inode_pages(&inode->i_data, 0);
> if (!inode->i_nlink) {
> inode->i_size = 0;
This would be better to move after truncate_inode_pages(). And as part
of "else".
if (!inode->i_nlink) {
...
} else {
/* here */
}
And inode->i_size should be ->mmu_private?
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2013-10-27 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-09 14:40 Namjae Jeon
2013-10-27 13:50 ` OGAWA Hirofumi [this message]
2013-10-29 23:24 ` Namjae Jeon
2013-10-30 1:27 ` OGAWA Hirofumi
2013-10-30 5:18 ` 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=87hac2yga3.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
Powered by JetHome