summaryrefslogtreecommitdiffstats
path: root/fs/ceph/locks.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2016-09-13 10:15:36 +0800
committerIlya Dryomov <idryomov@gmail.com>2016-10-03 16:13:49 +0200
commitdb4a63aab43b2040292b2023512864702b5f9799 (patch)
tree9197729f9ddb0a5f8f79c7148fe7d359ac00bfce /fs/ceph/locks.c
parente55f1a1871b148802b42ee3807edcb6528ffc27d (diff)
downloadblackbird-op-linux-db4a63aab43b2040292b2023512864702b5f9799.tar.gz
blackbird-op-linux-db4a63aab43b2040292b2023512864702b5f9799.zip
ceph: fix mandatory flock check
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/locks.c')
-rw-r--r--fs/ceph/locks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/locks.c b/fs/ceph/locks.c
index a2cb0c254060..6806dbeaee19 100644
--- a/fs/ceph/locks.c
+++ b/fs/ceph/locks.c
@@ -210,8 +210,8 @@ int ceph_flock(struct file *file, int cmd, struct file_lock *fl)
if (!(fl->fl_flags & FL_FLOCK))
return -ENOLCK;
/* No mandatory locks */
- if (__mandatory_lock(file->f_mapping->host) && fl->fl_type != F_UNLCK)
- return -ENOLCK;
+ if (fl->fl_type & LOCK_MAND)
+ return -EOPNOTSUPP;
dout("ceph_flock, fl_file: %p", fl->fl_file);
OpenPOWER on IntegriCloud