Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2910596pxb; Tue, 24 Aug 2021 10:24:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCdUxsfNNwoonSoeDaguSLt7qw3KAa8KYW5dVoUoQ1EGa5wisMbsHjT241rRamxJDP3lhY X-Received: by 2002:a05:6402:148:: with SMTP id s8mr44505529edu.298.1629825841670; Tue, 24 Aug 2021 10:24:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629825841; cv=none; d=google.com; s=arc-20160816; b=zr28dCC3aJA2E9Rn2OGmlqYArqvuKhrR7srSYdi3HOT6hYhOu0lf0q5mPN6tmUX8M+ jEiRKJccK45fUz3wBlrnNfKEq8m8bmso0mauGJXCFbxY4DQtBYW4aREPwXm2YkBvF3FE PBvbbM/RDoY+HuIn8nHqcYZWCB/Q1WroDBgy4zDncMgQ+LUs/+u8HxDQJL+5k0kv9LMa DUcgDv62SxR/yiZwUwTDN+AqU8TVwqUjW7g0I7Q097eagRz+L6nHJMNrZ9Obsc6ndtYE jeO6xhgts7GqqTBxfvYFvG3fca8DLHypWsgXnwgXJABsFlturmsdkQuwGuBb2c6ksflS XwLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=y15UEGRoh/+rVLxvUkqCqS2dMtcmxbRG5DzUYaTgImI=; b=z25goUm4sy81YRxi6b/X8Tv9KOIOs1oR2yEifAfv8CJNkwX6cYlOZkBxWUVxZ743H3 D/lnLSn4WieMdU/c9uv0hWMswib1YNWN5zNVN0MSXhN5RwLb9NInhOg/5XjnA+vc6+x+ Lhay9VHN6qXlz875sqEoHTkd9UxOlJGqeNrebNaswBW+vO4DuCEE7NGUX51NkaEj7vTD A7pHVS/0c+Qm5T5oSklUnk6QZrUCygLgWX5gPe+L/KqeBRhY1K+xgU/uhnoFy8WeVuO5 opdblia30SyUDBma4AWPHL7m3T5MYa5cIqZXVNgyqAHD0ivmHd9gWuEv1wpyO51Kn5b7 jDhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WDAk8Iaj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id b5si18509370ejq.268.2021.08.24.10.23.38; Tue, 24 Aug 2021 10:24:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WDAk8Iaj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S239338AbhHXRUU (ORCPT + 99 others); Tue, 24 Aug 2021 13:20:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:55440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240354AbhHXRRy (ORCPT ); Tue, 24 Aug 2021 13:17:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A1F0361ABF; Tue, 24 Aug 2021 17:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824527; bh=/q8yQ3JYw3AYKOWdv4iXUAHFPvHCHSE40XuW/0e42jE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WDAk8IajJ1Od3ZF2xIrZZxA5QaWdiObft1CSnrfBMVacne9bcEIQOgRSao2R/rEfN Ex2buDy9Jvunx4Ta5yWcSdVCqXkNGEtQoJIPYYLIXx+3f7WZRSUwnZ/25P4A1FqNRw kfKCj7Kv+FUO7Gh9kPK+wjAh3R1a20k2/PX/t0H5nOhtFwpTAKf80r1KvQ8GDUvRO+ z9Z7M889jufyfaXXoRYhGOurJyRdySwAx+Bo974rxLOu09N+YTd+7INIFyE4G37433 6kWFI9mSs3tOp09oxBy68+9CGtKMGukiwmQ+nTb0zXt/a2ADIAjGlvD6Jmpnt/ifcu t2TPsYk4sBLfw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jeff Layton , Sasha Levin Subject: [PATCH 5.4 59/61] fs: warn about impending deprecation of mandatory locks Date: Tue, 24 Aug 2021 13:01:04 -0400 Message-Id: <20210824170106.710221-60-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824170106.710221-1-sashal@kernel.org> References: <20210824170106.710221-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.143-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.4.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.4.143-rc1 X-KernelTest-Deadline: 2021-08-26T17:01+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeff Layton [ Upstream commit fdd92b64d15bc4aec973caa25899afd782402e68 ] We've had CONFIG_MANDATORY_FILE_LOCKING since 2015 and a lot of distros have disabled it. Warn the stragglers that still use "-o mand" that we'll be dropping support for that mount option. Cc: stable@vger.kernel.org Signed-off-by: Jeff Layton Signed-off-by: Sasha Levin --- fs/namespace.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/namespace.c b/fs/namespace.c index a092611d89e7..5782cd55dfdb 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1647,8 +1647,12 @@ static inline bool may_mount(void) } #ifdef CONFIG_MANDATORY_FILE_LOCKING -static inline bool may_mandlock(void) +static bool may_mandlock(void) { + pr_warn_once("======================================================\n" + "WARNING: the mand mount option is being deprecated and\n" + " will be removed in v5.15!\n" + "======================================================\n"); return capable(CAP_SYS_ADMIN); } #else -- 2.30.2