mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <chao2.yu@samsung.com>
Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs
Date: Mon, 28 Dec 2015 14:53:50 -0800	[thread overview]
Message-ID: <20151228225350.GC61500@jaegeuk.local> (raw)
In-Reply-To: <006f01d14158$63fa4a90$2beedfb0$@samsung.com>

Hi Chao,

On Mon, Dec 28, 2015 at 06:12:45PM +0800, Chao Yu wrote:
> If filesystem is readonly, don't recover inline dot inode.
> 
> Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> ---
>  fs/f2fs/namei.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
> index 5cc4128..b4a5836 100644
> --- a/fs/f2fs/namei.c
> +++ b/fs/f2fs/namei.c
> @@ -269,7 +269,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
>  	if (IS_ERR(inode))
>  		return ERR_CAST(inode);
>  
> -	if (f2fs_has_inline_dots(inode)) {
> +	if (f2fs_has_inline_dots(inode) && !f2fs_readonly(dir->i_sb)) {

We need to return -EROFS if f2fs is readonly?

Thanks,

>  		err = __recover_dot_dentries(inode, dir->i_ino);
>  		if (err)
>  			goto err_out;
> -- 
> 2.6.3
> 

  reply	other threads:[~2015-12-28 22:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-28 10:12 Chao Yu
2015-12-28 22:53 ` Jaegeuk Kim [this message]
2015-12-29  6:26   ` Chao Yu
2015-12-30  0:44     ` 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=20151228225350.GC61500@jaegeuk.local \
    --to=jaegeuk@kernel.org \
    --cc=chao2.yu@samsung.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --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

all inboxes | Powered by JetHome®