Skip to content

Commit

Permalink
Merge tag 'locks-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/jlayton/linux

Pull mandatory file locking deprecation warning from Jeff Layton:
 "As discussed on the list, this patch just adds a new warning for folks
  who still have mandatory locking enabled and actually mount with '-o
  mand'. I'd like to get this in for v5.14 so we can push this out into
  stable kernels and hopefully reach folks who have mounts with -o mand.

  For now, I'm operating under the assumption that we'll fully remove
  this support in v5.15, but we can move that out if any legitimate
  users of this facility speak up between now and then"

* tag 'locks-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux:
  fs: warn about impending deprecation of mandatory locks
  • Loading branch information
Linus Torvalds committed Aug 21, 2021
2 parents 002c0ae + fdd92b6 commit 15517c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1716,8 +1716,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
Expand Down

0 comments on commit 15517c7

Please sign in to comment.