Commit db4a63aa authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov

ceph: fix mandatory flock check

Signed-off-by: default avatarYan, Zheng <zyan@redhat.com>
parent e55f1a18
...@@ -210,8 +210,8 @@ int ceph_flock(struct file *file, int cmd, struct file_lock *fl) ...@@ -210,8 +210,8 @@ int ceph_flock(struct file *file, int cmd, struct file_lock *fl)
if (!(fl->fl_flags & FL_FLOCK)) if (!(fl->fl_flags & FL_FLOCK))
return -ENOLCK; return -ENOLCK;
/* No mandatory locks */ /* No mandatory locks */
if (__mandatory_lock(file->f_mapping->host) && fl->fl_type != F_UNLCK) if (fl->fl_type & LOCK_MAND)
return -ENOLCK; return -EOPNOTSUPP;
dout("ceph_flock, fl_file: %p", fl->fl_file); dout("ceph_flock, fl_file: %p", fl->fl_file);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment