Hi,

> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk....@samsung.com]
> Sent: Wednesday, November 27, 2013 1:14 PM
> To: Chao Yu
> Cc: linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; 
> linux-f2fs-de...@lists.sourceforge.net; 谭姝; fanofcode...@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...@samsung.com>
> > Signed-off-by: Fan Li <fanofcode...@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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to