Skip to content

Commit fdd92b6

Browse files
committed
fs: warn about impending deprecation of mandatory locks
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: [email protected] Signed-off-by: Jeff Layton <[email protected]>
1 parent 3dbdb38 commit fdd92b6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fs/namespace.c

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

17181718
#ifdef CONFIG_MANDATORY_FILE_LOCKING
1719-
static inline bool may_mandlock(void)
1719+
static bool may_mandlock(void)
17201720
{
1721+
pr_warn_once("======================================================\n"
1722+
"WARNING: the mand mount option is being deprecated and\n"
1723+
" will be removed in v5.15!\n"
1724+
"======================================================\n");
17211725
return capable(CAP_SYS_ADMIN);
17221726
}
17231727
#else

0 commit comments

Comments
 (0)