linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: Gu Zheng <guz.fnst@cn.fujitsu.com>
Cc: f2fs <linux-f2fs-devel@lists.sourceforge.net>,
	fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] f2fs: delete and free dirty dir freeing inode entry when sync dirty dir inodes
Date: Tue, 22 Oct 2013 20:15:44 +0900	[thread overview]
Message-ID: <1382440544.992.64.camel@kjgkr> (raw)
In-Reply-To: <5264D574.6000105@cn.fujitsu.com>

2013-10-21 (월), 15:19 +0800, Gu Zheng:
> In sync_dirty_dir_inodes(), remove_dirty_dir_inode() will be called
> in the callback of filemap_flush to delete and free dirty dir inode entry.
> But for the freeing inode entry, missed this step after sbumit data bio,
> and this may lead to a dead loop if these is freeing inode entry in
> dir_inode_list. So add the delete and free step to fix it.

Hi Gu,

This dirty inode will be removed by f2fs_evict_inode() after submitting
any pending bio, f2fs_submit_bio().
Thanks,

> 
> Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
> ---
>  fs/f2fs/checkpoint.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> index 8d16071..f61838f 100644
> --- a/fs/f2fs/checkpoint.c
> +++ b/fs/f2fs/checkpoint.c
> @@ -600,7 +600,16 @@ retry:
>  		 * wribacking dentry pages in the freeing inode.
>  		 */
>  		f2fs_submit_bio(sbi, DATA, true);
> +
> +		spin_lock(&sbi->dir_inode_lock);
> +		list_del(&entry->list);
> +#ifdef CONFIG_F2FS_STAT_FS
> +		sbi->n_dirty_dirs--;
> +#endif
> +		spin_unlock(&sbi->dir_inode_lock);
> +		kmem_cache_free(inode_entry_slab, entry);
>  	}
> +
>  	goto retry;
>  }
>  

-- 
Jaegeuk Kim
Samsung

  reply	other threads:[~2013-10-22 11:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21  7:19 [PATCH] f2fs: delete and free dirty dir freeing inode entry when sync dirty dir inodes Gu Zheng
2013-10-22 11:15 ` Jaegeuk Kim [this message]
2013-10-23 10:11   ` Gu Zheng

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=1382440544.992.64.camel@kjgkr \
    --to=jaegeuk.kim@samsung.com \
    --cc=guz.fnst@cn.fujitsu.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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).