commit | db4a63aab43b2040292b2023512864702b5f9799 | [log] [tgz] |
---|---|---|
author | Yan, Zheng <zyan@redhat.com> | Tue Sep 13 10:15:36 2016 +0800 |
committer | Ilya Dryomov <idryomov@gmail.com> | Mon Oct 03 16:13:49 2016 +0200 |
tree | 9197729f9ddb0a5f8f79c7148fe7d359ac00bfce | |
parent | e55f1a1871b148802b42ee3807edcb6528ffc27d [diff] |
ceph: fix mandatory flock check Signed-off-by: Yan, Zheng <zyan@redhat.com>
diff --git a/fs/ceph/locks.c b/fs/ceph/locks.c index a2cb0c2..6806dbe 100644 --- a/fs/ceph/locks.c +++ b/fs/ceph/locks.c
@@ -210,8 +210,8 @@ 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);