]> git.ipfire.org Git - people/ms/linux.git/commit - fs/namespace.c
fs: remove mandatory file locking support
authorJeff Layton <jlayton@kernel.org>
Thu, 19 Aug 2021 18:56:38 +0000 (14:56 -0400)
committerJeff Layton <jlayton@kernel.org>
Mon, 23 Aug 2021 10:15:36 +0000 (06:15 -0400)
commitf7e33bdbd6d1bdf9c3df8bba5abcf3399f957ac3
tree00770e117522b347bb99858aa9069171f0c8b779
parent2f488f698fda820f8e6fa0407630154eceb145d6
fs: remove mandatory file locking support

We added CONFIG_MANDATORY_FILE_LOCKING in 2015, and soon after turned it
off in Fedora and RHEL8. Several other distros have followed suit.

I've heard of one problem in all that time: Someone migrated from an
older distro that supported "-o mand" to one that didn't, and the host
had a fstab entry with "mand" in it which broke on reboot. They didn't
actually _use_ mandatory locking so they just removed the mount option
and moved on.

This patch rips out mandatory locking support wholesale from the kernel,
along with the Kconfig option and the Documentation file. It also
changes the mount code to ignore the "mand" mount option instead of
erroring out, and to throw a big, ugly warning.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
19 files changed:
Documentation/filesystems/mandatory-locking.rst [deleted file]
fs/9p/vfs_file.c
fs/Kconfig
fs/afs/flock.c
fs/ceph/locks.c
fs/gfs2/file.c
fs/locks.c
fs/namei.c
fs/namespace.c
fs/nfs/file.c
fs/nfsd/nfs4state.c
fs/nfsd/vfs.c
fs/ocfs2/locks.c
fs/open.c
fs/read_write.c
fs/remap_range.c
include/linux/fs.h
mm/mmap.c
mm/nommu.c