1
0
Fork 0

ceph: fix mandatory flock check

Signed-off-by: Yan, Zheng <zyan@redhat.com>
hifive-unleashed-5.1
Yan, Zheng 2016-09-13 10:15:36 +08:00 committed by Ilya Dryomov
parent e55f1a1871
commit db4a63aab4
1 changed files with 2 additions and 2 deletions

View File

@ -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);