X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=fs%2Fceph%2Flocks.c;h=6806dbeaee19ebe58276b9aa33796ebd35851dbf;hb=6f2e0d2c3bf0f8d322ab7516c57340c7189cca02;hp=a2cb0c254060f2bc0dd260334be910d005a3307f;hpb=e5451c8f8330e03ad3cfa16048b4daf961af434f;p=cascardo%2Flinux.git 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);