Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

ceph: fix mandatory flock check



Signed-off-by: default avatarYan, Zheng <zyan@redhat.com>
parent e55f1a18
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);