diff options
author | Jeff Layton <jlayton@kernel.org> | 2021-08-19 14:56:38 -0400 |
---|---|---|
committer | Jeff Layton <jlayton@kernel.org> | 2021-08-23 06:15:36 -0400 |
commit | f7e33bdbd6d1bdf9c3df8bba5abcf3399f957ac3 (patch) | |
tree | 00770e117522b347bb99858aa9069171f0c8b779 /fs/read_write.c | |
parent | 2f488f698fda820f8e6fa0407630154eceb145d6 (diff) |
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>
Diffstat (limited to 'fs/read_write.c')
-rw-r--r-- | fs/read_write.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index 9db7adf160d2..ffe821b8588e 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -388,13 +388,6 @@ int rw_verify_area(int read_write, struct file *file, const loff_t *ppos, size_t if (!unsigned_offsets(file)) return retval; } - - if (unlikely(inode->i_flctx && mandatory_lock(inode))) { - retval = locks_mandatory_area(inode, file, pos, pos + count - 1, - read_write == READ ? F_RDLCK : F_WRLCK); - if (retval < 0) - return retval; - } } return security_file_permission(file, |