Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1351594imm; Wed, 25 Jul 2018 16:43:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdVPnHMl2Rxj+EfAu8NRx3Gja9BIXIccWmzI+D/tZnmIM/HiNMkGJFhvd3nzzFYmHD1PCTD X-Received: by 2002:a17:902:294a:: with SMTP id g68-v6mr23414159plb.58.1532562205308; Wed, 25 Jul 2018 16:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532562205; cv=none; d=google.com; s=arc-20160816; b=VZK1YXA8mr+Cby3C4sNwngcKYCa3nkfdioatay3dXmCURDZs+SX028itABvf3OiUFx Co238gdFSxXuzkuGYUj4W5pWZ9W2dwNP4DrabQjsAfjErVC2BDqEJayIQbtUUDPpkWLU Lv71gLO7HZl4OMQ1Rk08ybLRFy6QobDI5OyW537wcXCZ6ju7WaPUMrPoCEKVhUY51oYI /mFkiOo6MBhN98k1aAxDiZnxtyoMZqTPnAKc5OJbKZVLEXKgWsaNsSeMGno1R2yrPMi0 dkJFHR8/5QWUTl5rLOWekcxSFDAKWs0T9gki+/AJqrDF/Sl6HYcdYAuwzPC0BTLkfxOz S7lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=W9dfg1s85VDudth9+proWtzKOtCflnwvVLAbphlR1sk=; b=UgvCMLjaidG7qnDw6Z1MFfTr3dgMXv2tIVUYtP4Aljm9x04a6dc/rZcmsFdLJTYEAk 5IflCPQo+2L1ge+USk7T1ngcKNroujD180G4m/eicPZPi6i8NTpqZmWGvJROy2p0Afu8 jm9F+s4jnbdV15VhZcVxX1i2aNUfCMln6/AHfGg8+57yJRyTlPaqYh/ue9gXyYEk9A+O H4yj3kouZBTaXYl8exhKhHD4AvsVTfFEIicZowqFF/eNmrZb6xUGopSAzey7l+roW3Wq 4Hkndp0u6NilhH+WSA1XiQnDrB97iF0LDr3qC/3uLzwmeE0iJx6CnCvTGOLAow2EDGXS hNDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=abdrov4j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73-v6si14487243pgh.343.2018.07.25.16.43.10; Wed, 25 Jul 2018 16:43:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=abdrov4j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731560AbeGZAeO (ORCPT + 99 others); Wed, 25 Jul 2018 20:34:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:56560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731431AbeGZAeN (ORCPT ); Wed, 25 Jul 2018 20:34:13 -0400 Received: from localhost.localdomain (unknown [180.111.133.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8BE1B20833; Wed, 25 Jul 2018 23:20:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1532560818; bh=mK2ZhP7TCSdLdwnstHNpKCeWwvmzlKLmciXqjCB1+DQ=; h=From:To:Cc:Subject:Date:From; b=abdrov4jVpRYEvZnzZE1V7w8g8D4UHXo0BkZ4miUNMu8OHyZJzqocsxQbJawjcowU 7ff8ttEzkPwKid1qhynW7T1pL5omwEOQ6W+JOSnF2AyZ3JTUUtn1V8At3hK4b+fxFz JAdkf6S5zWODUK82/Ya1NWfNGMe58NF+9iqDnMmw= From: Chao Yu To: jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu Subject: [PATCH RESEND] f2fs: fix to restrict mount condition when without CONFIG_QUOTA Date: Thu, 26 Jul 2018 07:19:48 +0800 Message-Id: <20180725231948.18075-1-chao@kernel.org> X-Mailer: git-send-email 2.16.2.17.g38e79b1fd Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chao Yu Like quota_ino feature, we need to reject mounting RDWR with image which enables project_quota feature when there is no CONFIG_QUOTA be set in kernel. Signed-off-by: Chao Yu --- fs/f2fs/super.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index dbc1cb53581f..bc7c14a055bb 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -775,6 +775,12 @@ static int parse_options(struct super_block *sb, char *options) "without CONFIG_QUOTA"); return -EINVAL; } + if (f2fs_sb_has_project_quota(sbi->sb) && !f2fs_readonly(sbi->sb)) { + f2fs_msg(sb, KERN_ERR, + "Filesystem with project quota feature cannot be " + "mounted RDWR without CONFIG_QUOTA"); + return -EINVAL; + } #endif if (F2FS_IO_SIZE_BITS(sbi) && !test_opt(sbi, LFS)) { -- 2.16.2.17.g38e79b1fd