Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754341AbbL3JlQ (ORCPT ); Wed, 30 Dec 2015 04:41:16 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:60256 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753904AbbL3JlN (ORCPT ); Wed, 30 Dec 2015 04:41:13 -0500 X-AuditID: cbfee61b-f793c6d00000236c-ad-5683a6b7bc7f From: Chao Yu To: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH v2] f2fs: fix to skip recovering dot dentries in a readonly fs Date: Wed, 30 Dec 2015 17:40:31 +0800 Message-id: <00ef01d142e6$3802e480$a808ad80$@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: AdFC5etJfPUZw0+GQrewtlpt3hI/KQ== Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDLMWRmVeSWpSXmKPExsVy+t9jAd3ty5rDDFo/iVk8WT+L2eLSIneL y7vmsDkwe2xa1cnmsXvBZyaPz5vkApijuGxSUnMyy1KL9O0SuDK2Xp7EWvCLteLU9ZesDYyP WLoYOTkkBEwkjq7bxAxhi0lcuLeerYuRi0NIYCmjxONfJ5kgnFeMEsuur2QFqWITUJFY3vGf CcQWAbIPLbrMDmIzC3hINHZ8B6sRFvCTaNu5AqyGRUBVYuexA2BxXgFLiRNv10DZghI/Jt9j gejVkli/8zgThC0vsXnNW6iLFCR2nH3NCLFLT2J/zyQ2iBpxiY1HbrFMYBSYhWTULCSjZiEZ NQtJywJGllWMEqkFyQXFSem5Rnmp5XrFibnFpXnpesn5uZsYwWH8THoH4+Fd7ocYBTgYlXh4 Twg1hwmxJpYVV+YeYpTgYFYS4f1YBxTiTUmsrEotyo8vKs1JLT7EKM3BoiTOu+9SZJiQQHpi SWp2ampBahFMlomDU6qBMcBhhgEHl05Exr+33BOe2785U6h7fI5u6jNTm5nrziRc6Hthcvbh 7Rz5mPemSyU4LnVvkxf/sPjEf9lcmZkTDzPbWFSUrUlh/zJhyVm1pmNrv3b6pDrLnRGecFji 3oeA6S4devqVN1Sk9+2WiHAME9w8o4i7ZqfF5RnzvlxxmZL1d87UjO73TkosxRmJhlrMRcWJ ANRh/fhfAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 975 Lines: 37 If filesystem is readonly, leave user message info instead of recovering inline dot inode. Signed-off-by: Chao Yu --- v2: - add to print message. fs/f2fs/namei.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 6c4a943..a629af5 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -214,6 +214,13 @@ static int __recover_dot_dentries(struct inode *dir, nid_t pino) struct page *page; int err = 0; + if (f2fs_readonly(sbi->sb)) { + f2fs_msg(sbi->sb, KERN_INFO, + "skip recovering inline_dots inode (ino:%lu, pino:%u) " + "in readonly mountpoint", dir->i_ino, pino); + return 0; + } + f2fs_balance_fs(sbi); f2fs_lock_op(sbi); -- 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/