Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752841AbbL1Wxz (ORCPT ); Mon, 28 Dec 2015 17:53:55 -0500 Received: from mail.kernel.org ([198.145.29.136]:41532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752566AbbL1Wxw (ORCPT ); Mon, 28 Dec 2015 17:53:52 -0500 Date: Mon, 28 Dec 2015 14:53:50 -0800 From: Jaegeuk Kim To: Chao Yu 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 Message-ID: <20151228225350.GC61500@jaegeuk.local> References: <006f01d14158$63fa4a90$2beedfb0$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <006f01d14158$63fa4a90$2beedfb0$@samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1060 Lines: 36 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 > --- > 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/