Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2897244pxb; Tue, 24 Aug 2021 10:06:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFx/GPBl3Pi5yhO8CnkYg//armux6YpHpVrJ0vhuyXa5ftVD/EgWEBSYaRH6AJmdJO+JVa X-Received: by 2002:a02:c055:: with SMTP id u21mr640865jam.113.1629824803101; Tue, 24 Aug 2021 10:06:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629824803; cv=none; d=google.com; s=arc-20160816; b=eDskqgKYOkXwI0/YNOypCf0650HnH0GrmKcckgfMqbOdMHMhMosNoH/pBGHDxY6z8/ MhkTR+cYMkfY89UHeyigzjjkqlBN1m3rNQJkyBmGFS52nQwRL/xYncbutDAIPFn8QAT/ yIQVv8uHczCs8QgRo7ULByEHRXM9kz2ziOH6Rj3zAeyGiwXUtMH+whL4yXkqMzndYNzn wSER2S3LbdFJsK2935lfZc8+MHiA97VrNdhLKd8Z5WZCesKa881LsKnk6it+Z2MTeyOp uLYEOi0+rg4qc9ImlOD/aYxkmosfpAhDYMDMqjlcX5TtMzyjPtgKjXr7b63ODe8YQb+f LiSg== 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=WZCZpglnlMeOJLp86j+yDT9dYXFK7p1b+0VwFkaGG34=; b=rqiFfxY6tsVlEHXvioJ8Xxi9x0a3IhQ5qPs6ksv9N4mm8ELxsTFbdGHpSBndPO4eW8 Ql2VCdU1yiifdOomf1DZx3bnZ6QlrDvs1Ejqk2cG6hUNn620t68CmsVKvq3s3ETobwB3 xJC9LYtWtMRiYNn9Bv99omWyJqavemC5SoSyWnSSTbDyANN1kHCz9yzISvITOAoWTgM6 Fw5mzFSJUS8fr7Ab4ChIaT948Z3FeEndsFtwB8Krt3ghx0TRSEUYjaFpTFB1Sr5jwCvY U1KF/5gRwA6spzHbLYNqFIsaQsni1HBYf+Pis6KXq5JpE0MbOuHHf2JBBL9tuFcekILz 08ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E1fXrJll; 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 t39si20688435jal.96.2021.08.24.10.06.30; Tue, 24 Aug 2021 10:06:43 -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=E1fXrJll; 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 S233104AbhHXRGO (ORCPT + 99 others); Tue, 24 Aug 2021 13:06:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:45878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238998AbhHXRCi (ORCPT ); Tue, 24 Aug 2021 13:02:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EFDCD613E8; Tue, 24 Aug 2021 16:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824293; bh=2Z3S7c/lBhQsUX0OkCkzyNglGW8SQdbu3dM+7jbsjEI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E1fXrJllvEHHQe6uSSkXEFERG3iftZsOo1/fxYIGZwUlni+WvdZkcDsXkHJy6X4b0 fGgI4EWIKLTjh3NL1YHf45XY3gWiOiwE5Dj0UjbJKPHzp6b4ZZjzebFQkwCoXabRdZ BEwOhGSyG7CaCLfJc9OsbflT7aRzAjuwIPF32LTRJYiP3tgU+7BXZ0VRXsQoW/MHaY NnlOTNEkWAw0BjHkJdP0ZlLLrkRoVg7BmDgEtVo+RO2fNWZjzU5dvo13r902Fi/+uj ZR6K2z1Z13Et9VATKcMxODXzb3tsZ35gjM/ccaow6T78o9CuwtXuLWuHP+Os2JNqFW 4OPMaDc6eUcig== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jeff Layton , Sasha Levin Subject: [PATCH 5.13 126/127] fs: warn about impending deprecation of mandatory locks Date: Tue, 24 Aug 2021 12:56:06 -0400 Message-Id: <20210824165607.709387-127-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824165607.709387-1-sashal@kernel.org> References: <20210824165607.709387-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.13.13-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.13.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.13.13-rc1 X-KernelTest-Deadline: 2021-08-26T16:55+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 caad091fb204..03770bae9dd5 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1716,8 +1716,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