Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2922815pxb; Tue, 24 Aug 2021 10:40:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmpxPde8TJ09QXEbxjyz+aV8B+JMQWxI2etar4Mbq18qrlbSYCd6OA4lsO//venbT7VhWJ X-Received: by 2002:aa7:cb86:: with SMTP id r6mr44387532edt.181.1629826852494; Tue, 24 Aug 2021 10:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629826852; cv=none; d=google.com; s=arc-20160816; b=AnNLtBJmhJAboc7zl8tBgCgNyG6Q1rUnhNgx9h4NTP7Sz6fXHy6Rvc2c8Z7ahpizHm am/KhTQJYyak06rU5wvuwoErH/9Zr7NE79GXn8CHBZtzaApYZb8GC4Towng/EPTOJrEW UPPVtCUZC1CDkU5kYJ0JljKEbOibCVkiyeyRC8X3AfxQvoybthdp9SKbBiP/tY4+PMGs P2wRsGPxHtV8I/JrZMayK1JNgo97ZwEevEh6zdVfKD0E0ueA+QRUA/QYstlE55LJ43TP zFsgmL0z7XQ/fLxjueYy2HQ9ne2LPuVqq2HsOYH/psJpXk1L3zDRCkjZgsN4DcQhqJh8 z1Cw== 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=k1D5SBpJUT+WHez24Sih+s0pvCeSCHnxBlDO+BuJaOc=; b=qfJzGShfiSQ8xjWfJhhEDjVyL8bKwYiZrz+ToPdnzEyQGGAScysKC/K7+Hzdbobwyd DxeUwCMrML3GN597EFcSv1FJkNWKL/6oHG0iV287ckxu63tD/vXIpBTdzchEKrQcH189 cCWnlJaphFgnV0s5WvKxicRuIoAcm6cvZVgKARP1TchYV7Z+yF6zzVTyTDef8vLUsQoA JnuNfZOejqdsodAOPlt34jVtZSkedAv768jXgRGmQWmLaFkRRuggT757wQ9RawVbCfdc vVIRU9mHI1ugHLkdDJb1Z1H/JlcmM/pHj/Cu8l9IT42AZy+mhvYfZ9/Y1T3RfdSqGE71 uN0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CjaWHjP2; 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 hb44si9035889ejc.714.2021.08.24.10.40.27; Tue, 24 Aug 2021 10:40:52 -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=CjaWHjP2; 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 S242445AbhHXRjS (ORCPT + 99 others); Tue, 24 Aug 2021 13:39:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:40664 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240349AbhHXRgh (ORCPT ); Tue, 24 Aug 2021 13:36:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B2CA361BE5; Tue, 24 Aug 2021 17:06:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824817; bh=WCfseJ+9r+IKuHwaKDZrYboBqJqWWqfCwNONAY6Uwnw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CjaWHjP2FCOEdWDuLCoeBJmfs1kcFOUA2isGlFKMu2XbMopMyjgaZrYOk7RCOLL02 tOP4O/EPkfSTQcM0FVoQvhLwc/eamoQTiohoL/4yuyjirvaZjbVkonCyAOo5onIdxw Px+ccZ/j25+u1yhX1EeCRsiamCocTslYsCxLKMsQgSQKw1AR2NwON+A+/SL19vqZXO 9t0h1DemGXMP2duxFM3EgxMPsxrNoVNe9OWBlHM+M2DfYvqUxgh/+YeTjLTzSmsDz+ Ig7POirO+xGSe+BrXx9yr3uMSC/+ymBTBfi1wLMIJWqM5L/EzijMwoqGv7k20nUud6 ZkLdo+vFntJMQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jeff Layton , Sasha Levin Subject: [PATCH 4.9 42/43] fs: warn about impending deprecation of mandatory locks Date: Tue, 24 Aug 2021 13:06:13 -0400 Message-Id: <20210824170614.710813-43-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824170614.710813-1-sashal@kernel.org> References: <20210824170614.710813-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.281-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.9.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.9.281-rc1 X-KernelTest-Deadline: 2021-08-26T17:06+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 68457fa2f981..b9e30a385c01 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1670,8 +1670,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