Skip to content

Commit 0febcf9

Browse files
jtlaytonSasha Levin
authored andcommitted
fs: warn about impending deprecation of mandatory locks
[ 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 <jlayton@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent c5e6310 commit 0febcf9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

fs/namespace.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,8 +1670,12 @@ static inline bool may_mount(void)
16701670
}
16711671

16721672
#ifdef CONFIG_MANDATORY_FILE_LOCKING
1673-
static inline bool may_mandlock(void)
1673+
static bool may_mandlock(void)
16741674
{
1675+
pr_warn_once("======================================================\n"
1676+
"WARNING: the mand mount option is being deprecated and\n"
1677+
" will be removed in v5.15!\n"
1678+
"======================================================\n");
16751679
return capable(CAP_SYS_ADMIN);
16761680
}
16771681
#else

0 commit comments

Comments
 (0)