All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu <chao2.yu@samsung.com>
To: jaegeuk.kim@samsung.com
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	'谭姝' <shu.tan@samsung.com>,
	fanofcode.li@samsung.com
Subject: RE: [f2fs-dev] [PATCH] f2fs: remove unneeded code in punch_hole
Date: Wed, 27 Nov 2013 13:25:37 +0800	[thread overview]
Message-ID: <002e01ceeb31$44c21ce0$ce4656a0$@samsung.com> (raw)
In-Reply-To: <1385529248.2417.19.camel@kjgkr>

Hi,

> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk.kim@samsung.com]
> Sent: Wednesday, November 27, 2013 1:14 PM
> To: Chao Yu
> Cc: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net; 谭姝; fanofcode.li@samsung.com
> Subject: Re: [f2fs-dev] [PATCH] f2fs: remove unneeded code in punch_hole
> 
> Got it.
> 
> But, with this patch, we can also remove the parameter, int mode, in
> punch_hole().
> If no objection, I'll fix that in your patch.
> Thanks,

Right, we should remove it.
Thanks!

> 
> 2013-11-22 (금), 16:52 +0800, Chao Yu:
> > Because FALLOC_FL_PUNCH_HOLE flag must be ORed with FALLOC_FL_KEEP_SIZE
> > in fallocate, so we could remove the useless 'keep size' branch code which
> > will never be excuted in punch_hole.
> >
> > Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> > Signed-off-by: Fan Li <fanofcode.li@samsung.com>
> > ---
> >  fs/f2fs/file.c |    6 ------
> >  1 file changed, 6 deletions(-)
> >
> > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> > index 7d714f4..0087d2a 100644
> > --- a/fs/f2fs/file.c
> > +++ b/fs/f2fs/file.c
> > @@ -499,12 +499,6 @@ static int punch_hole(struct inode *inode, loff_t offset, loff_t len, int mode)
> >  		}
> >  	}
> >
> > -	if (!(mode & FALLOC_FL_KEEP_SIZE) &&
> > -		i_size_read(inode) <= (offset + len)) {
> > -		i_size_write(inode, offset);
> > -		mark_inode_dirty(inode);
> > -	}
> > -
> >  	return ret;
> >  }
> >
> 
> --
> Jaegeuk Kim
> Samsung

      reply	other threads:[~2013-11-27  5:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22  8:52 [PATCH] f2fs: remove unneeded code in punch_hole Chao Yu
2013-11-22  8:52 ` [f2fs-dev] " Chao Yu
2013-11-27  5:14 ` Jaegeuk Kim
2013-11-27  5:14   ` [f2fs-dev] " Jaegeuk Kim
2013-11-27  5:25   ` Chao Yu [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='002e01ceeb31$44c21ce0$ce4656a0$@samsung.com' \
    --to=chao2.yu@samsung.com \
    --cc=fanofcode.li@samsung.com \
    --cc=jaegeuk.kim@samsung.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shu.tan@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.