Skip to content
Snippets Groups Projects
Commit 0febcf95 authored by Jeff Layton's avatar Jeff Layton Committed by Sasha Levin
Browse files

fs: warn about impending deprecation of mandatory locks


[ Upstream commit fdd92b64 ]

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: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c5e63107
No related branches found
No related tags found
No related merge requests found
...@@ -1670,8 +1670,12 @@ static inline bool may_mount(void) ...@@ -1670,8 +1670,12 @@ static inline bool may_mount(void)
} }
#ifdef CONFIG_MANDATORY_FILE_LOCKING #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); return capable(CAP_SYS_ADMIN);
} }
#else #else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment