Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2920370pxb; Tue, 24 Aug 2021 10:37:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxEEm5crVBNWHem+oL0E5k/K58m/+EsXJXEE0q5f7imZfbg8//NUaSIx7xHx2sVJhLMCU5 X-Received: by 2002:aa7:cc02:: with SMTP id q2mr43624435edt.154.1629826647968; Tue, 24 Aug 2021 10:37:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629826647; cv=none; d=google.com; s=arc-20160816; b=XiChU9VfwRFob05CoRWg//IG1TK9XybsGEiMuoN42702p4agXkoT8/rXWDLA/zqcwc 9kB7ZzCp1n+wmYkHHjS5Nwmx8UfE7KF0UQ7C9vBKbCfsbeIKJdA/lG9dcyNo79qApbx1 4gc7/jcZUvhznzwdMgsgl/ewr7X9sGrt+Xdz/Jr4/paHVQLSvb618OrWjE2JV0qkk2ot KMl/+gAyQrz6mkvcIW86N4evr239ftHoptEWt1cONrYs3UizNxaI+QN0CLsdRWIrNFtu Jcs7B34k/Vh3eWLJa/KyZF+Do4wQWWfJ7KPrdfZUTb5a/EO9AZirmSOgGxOU2Z6HVmIP Zv+w== 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=tMblT9mzxgtvt3YKb1dz2Qc+zGMncKzqiUr5PuD0qsU=; b=PZkFnbbnpLb2anoiwyz5rmZGLcbIx1j07wunxlKL+WWvaVLa0A7j9w0lv++N7P5TPi OhQ4CDBUA9EBx8eJHsyADQbYDvUYF4wtyE2NTUF09roNHpaJijR+p+dXbw7aDb21wEBb sZpVGQZmCCVrib7lXx/HMNrw0d+hf/wAa4TwT+DXaQqQUmYOQzoSiwlYr2R2G5cPAC4W vU8/3h0qimCvR7h/Xg6Gb0L4AKqWWsB9pPZfMeKXaoLcc7l4fi7ESrV55RFRiDaqN53q H616giKeyJiaeo1obnW4bJb1Gvp+5Uy1bISFcbflk7CmWE9fxC7JcHb6t7Y6/guiDQxj maAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fQsJe2oU; 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.37.04; Tue, 24 Aug 2021 10:37:27 -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=fQsJe2oU; 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 S241560AbhHXRgX (ORCPT + 99 others); Tue, 24 Aug 2021 13:36:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:39996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240490AbhHXRcE (ORCPT ); Tue, 24 Aug 2021 13:32:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 19F47610D1; Tue, 24 Aug 2021 17:05:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824758; bh=g+YEbINb/kUFZB5S5iLxbmNjgwyj6f8shFy1WJf2Ilg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fQsJe2oU6kg5Afc9Hfu4chtMnBk3vx5Nu9wtzgdzlDmj/csPt9MahJpHA8l5cvQ6J 8NMKyMo2rL/HijR5Osf81j50aHziURDche3PN2rYIM8EuT9POs6oj8ir89JX7u0OZb 7MHqxB3n/HRZw+6c+tyD65Kym3EUsZALec09bsGAp2B8GJemLJ8HIeRdHfprAukoDD co5C4qW9a1kdbH4Y9fwR3uoVmDwA+sgsvYZq2R4wnraav7jTb74EI75Vn6GQV7Mn0U gF7CMzSd8kSDVV36bWGbSDSrOUcrRy2o1ie8JddWcMPMvEv/0qvRDDIOTfk63uEnGw xg5pUwlA791RA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jeff Layton , Sasha Levin Subject: [PATCH 4.14 62/64] fs: warn about impending deprecation of mandatory locks Date: Tue, 24 Aug 2021 13:04:55 -0400 Message-Id: <20210824170457.710623-63-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824170457.710623-1-sashal@kernel.org> References: <20210824170457.710623-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.245-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.245-rc1 X-KernelTest-Deadline: 2021-08-26T17:04+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 11def59b0d50..683668a20bed 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1696,8 +1696,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