summaryrefslogtreecommitdiff
path: root/fs/gfs2
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2021-09-10 15:36:29 -0400
committerJeff Layton <jlayton@kernel.org>2021-09-10 16:21:44 -0400
commit90f7d7a0d0d68623b5f7df5621a8d54d9518fcc4 (patch)
tree45d9848be89c64360b82aa49fbb19af46eb46164 /fs/gfs2
parentbf9f243f23e6623f310ba03fbb14e10ec3a61290 (diff)
locks: remove LOCK_MAND flock lock support
As best I can tell, the logic for these has been broken for a long time (at least before the move to git), such that they never conflict with anything. Also, nothing checks for these flags and prevented opens or read/write behavior on the files. They don't seem to do anything. Given that, we can rip these symbols out of the kernel, and just make flock(2) return 0 when LOCK_MAND is set in order to preserve existing behavior. Cc: Matthew Wilcox <willy@infradead.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/file.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index c559827cb6f9..078ef29e31bc 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -1338,8 +1338,6 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
{
if (!(fl->fl_flags & FL_FLOCK))
return -ENOLCK;
- if (fl->fl_type & LOCK_MAND)
- return -EOPNOTSUPP;
if (fl->fl_type == F_UNLCK) {
do_unflock(file, fl);