Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752642AbbL2G1j (ORCPT ); Tue, 29 Dec 2015 01:27:39 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:37904 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbbL2G1g (ORCPT ); Tue, 29 Dec 2015 01:27:36 -0500 X-AuditID: cbfee61a-f79266d000003652-42-568227d6c11d From: Chao Yu To: "'Jaegeuk Kim'" Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <006f01d14158$63fa4a90$2beedfb0$@samsung.com> <20151228225350.GC61500@jaegeuk.local> In-reply-to: <20151228225350.GC61500@jaegeuk.local> Subject: RE: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs Date: Tue, 29 Dec 2015 14:26:53 +0800 Message-id: <00c601d14202$016a0c30$043e2490$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AQKpWlFm7dzEYxm46D1mVmFi5RzfcAHO67jNnSLWYjA= Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRmVeSWpSXmKPExsVy+t9jAd1r6k1hBu/vS1k8WT+L2eLSIneL y7vmsDkwe2xa1cnmsXvBZyaPz5vkApijuGxSUnMyy1KL9O0SuDKW/l7NWPCBq+Jbh2oD4xmO LkZODgkBE4kn5y8wQ9hiEhfurWfrYuTiEBJYyijx9N4UFgjnFaPEzKOzWEGq2ARUJJZ3/GcC sUUE1CR6900Bs5kFPCQaO76D1QgJJElM+AzSzMnBKWAs0TXpDBuILSzgL3Hwx2WwOIuAqsST nh/sIDavgKXEkRWNULagxI/J91ggZmpJrN95HGq+vMTmNW+hLlWQ2HH2NWMXIwfQDVYSjT/U IUrEJTYeucUygVFoFpJJs5BMmoVk0iwkLQsYWVYxSqQWJBcUJ6XnGuallusVJ+YWl+al6yXn 525iBIf8M6kdjAd3uR9iFOBgVOLhzZjUGCbEmlhWXJl7iFGCg1lJhNd1C1CINyWxsiq1KD++ qDQntfgQozQHi5I4b+2lyDAhgfTEktTs1NSC1CKYLBMHp1QDY+PXXyK/95bK/l3Z8+6I9t4r b/293N22Kz9K+jIptEC2ib1Mxvi90W7d2gbL1R1/d7+WN34ecWfHue4fDdyO8rd/7Mu/fv/0 LPmiCiFdt/N3Nyzt+Xj5svW145M89V7+nlnz+NkvxvKfwU++nMxRil+o/5h7ptYj+wNrC6v8 snatdmey+7oj/60SS3FGoqEWc1FxIgAKqOy4dQIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1589 Lines: 53 Hi Jaegeuk, > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Tuesday, December 29, 2015 6:54 AM > 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 > > 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? In a readonly mountpoint, we should still allow user to stat file/dir in directory structure, rather than returning -EROFS when trying to recover, Right? Thanks, > > 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/