mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
Merge tag 'filelock-v5.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux
Pull file locking updates from Jeff Layton: "Just a couple of minor bugfixes, a revision to a tracepoint to account for some earlier changes to the internals, and a patch to add a pr_warn message when someone tries to mount a filesystem with '-o mand' on a kernel that has that support disabled" * tag 'filelock-v5.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: fix a memory leak bug in __break_lease() locks: print a warning when mount fails due to lack of "mand" support locks: Fix procfs output for file leases locks: revise generic_add_lease tracepoint
This commit is contained in:
@@ -1643,13 +1643,18 @@ static inline bool may_mount(void)
|
||||
return ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MANDATORY_FILE_LOCKING
|
||||
static inline bool may_mandlock(void)
|
||||
{
|
||||
#ifndef CONFIG_MANDATORY_FILE_LOCKING
|
||||
return false;
|
||||
#endif
|
||||
return capable(CAP_SYS_ADMIN);
|
||||
}
|
||||
#else
|
||||
static inline bool may_mandlock(void)
|
||||
{
|
||||
pr_warn("VFS: \"mand\" mount option not supported");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Now umount can handle mount points as well as block devices.
|
||||
|
Reference in New Issue
Block a user