From: Jaegeuk Kim <jaegeuk@kernel.org>
To: hujianyang <hujianyang@huawei.com>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] Space leak in f2fs
Date: Wed, 13 May 2015 18:45:39 -0700 [thread overview]
Message-ID: <20150514014538.GA69664@jaegeuk-mac02> (raw)
In-Reply-To: <5553FD09.9030508@huawei.com>
I'll push the patch into dev branch right now.
Let me know, if there is any problem.
Thanks,
On Thu, May 14, 2015 at 09:40:25AM +0800, hujianyang wrote:
> Hi Jaegeuk,
>
> I've tested this patch. It's OK now. Seems this problem is fixed.
>
> I'd like to push this patch to my local tree and run a formal
> stress test next week. Will you push this patch to f2fs-dev branch?
>
> If you have other modification to this fix, please let me know.
>
> Thanks very much!
> Hu
>
> On 2015/5/14 8:24, Jaegeuk Kim wrote:
> > Hi Hu,
> >
> > Found a bug in the previous patch.
> > Could you check this out?
> >
> > Thanks,
> >
> > ---
> > fs/f2fs/super.c | 11 ++++++++++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> > index 19438f2..647591b 100644
> > --- a/fs/f2fs/super.c
> > +++ b/fs/f2fs/super.c
> > @@ -431,8 +431,17 @@ static int f2fs_drop_inode(struct inode *inode)
> > * - f2fs_gc -> iput -> evict
> > * - inode_wait_for_writeback(inode)
> > */
> > - if (!inode_unhashed(inode) && inode->i_state & I_SYNC)
> > + if (!inode_unhashed(inode) && inode->i_state & I_SYNC) {
> > + if (!inode->i_nlink && !is_bad_inode(inode)) {
> > + spin_unlock(&inode->i_lock);
> > + i_size_write(inode, 0);
> > +
> > + if (F2FS_HAS_BLOCKS(inode))
> > + f2fs_truncate(inode);
> > + spin_lock(&inode->i_lock);
> > + }
> > return 0;
> > + }
> > return generic_drop_inode(inode);
> > }
> >
> >
next prev parent reply other threads:[~2015-05-14 1:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 7:17 Space leak in f2fs hujianyang
2015-05-13 17:46 ` [f2fs-dev] " Jaegeuk Kim
2015-05-14 0:24 ` Jaegeuk Kim
2015-05-14 1:40 ` hujianyang
2015-05-14 1:45 ` Jaegeuk Kim [this message]
2015-05-14 21:14 ` [f2fs-dev] " Jaegeuk Kim
2015-05-15 8:31 ` Chao Yu
2015-05-16 0:55 ` Jaegeuk Kim
2015-05-18 2:43 ` Chao Yu
2015-05-18 2:50 ` Nicholas Krause
2015-05-18 5:44 ` [f2fs-dev] " Jaegeuk Kim
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=20150514014538.GA69664@jaegeuk-mac02 \
--to=jaegeuk@kernel.org \
--cc=hujianyang@huawei.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).