Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752490AbbL1KNd (ORCPT ); Mon, 28 Dec 2015 05:13:33 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:37112 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333AbbL1KN1 (ORCPT ); Mon, 28 Dec 2015 05:13:27 -0500 X-AuditID: cbfee61b-f793c6d00000236c-8d-56810b46a52d From: Chao Yu To: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs Date: Mon, 28 Dec 2015 18:12:45 +0800 Message-id: <006f01d14158$63fa4a90$2beedfb0$@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: AdFBWDdl3Ugk0KMiRQSa6HgystZE+A== Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNLMWRmVeSWpSXmKPExsVy+t9jAV037sYwg997+S2erJ/FbHFpkbvF 5V1z2ByYPTat6mTz2L3gM5PH501yAcxRXDYpqTmZZalF+nYJXBkPv/WyFcxjrdi78hJLA+NS li5GTg4JAROJv48fsUHYYhIX7q0Hsrk4hASWMkrM+LmfESQhJPCKUeJnizSIzSagIrG84z8T iC0CZB9adJkdxGYW8JBo7PjOCmILC3hLLHzRzAxiswioSvQtagOr4RWwlDi97w8zhC0o8WPy PRaIXi2J9TuPM0HY8hKb17xlhjhIQWLH2deMELv0JO6vaoaqEZfYeOQWywRGgVlIRs1CMmoW klGzkLQsYGRZxSiRWpBcUJyUnmuUl1quV5yYW1yal66XnJ+7iREcxM+kdzAe3uV+iFGAg1GJ h9egoSFMiDWxrLgy9xCjBAezkgiv6RugEG9KYmVValF+fFFpTmrxIUZpDhYlcd59lyLDhATS E0tSs1NTC1KLYLJMHJxSDYx1XJXfzyqmxE6bVdn02CTS8YtW6QHbLcGTyj23L5+6Ytes+X80 dThmp3ReEqs++HiGI+uEf3JH5XWm2N0VdLsteH6u3Nk9J2Yn+MvMTPz1bEJ+2/mO6oRZu5Jn aWkuMXh2SSk2xN5uhdXDpgDBwEKpGTd2py7+GHn+58mtzeL/0kMOys8NLrBQYinOSDTUYi4q TgQAu48kT14CAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 891 Lines: 29 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)) { 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/