X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Focfs2%2Flocks.c;h=b5cb3ede9408944d99abc7c7c3b28c01b1ddadeb;hb=e2bca7c76a79b68506bfc3699beb74c0d41fe230;hp=544ac6245175f26c23249cf916c5001ae8f5d067;hpb=53da4939f349d4edd283b043219221ca5b78e4d4;p=karo-tx-linux.git diff --git a/fs/ocfs2/locks.c b/fs/ocfs2/locks.c index 544ac6245175..b5cb3ede9408 100644 --- a/fs/ocfs2/locks.c +++ b/fs/ocfs2/locks.c @@ -133,7 +133,7 @@ int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl) if (!(fl->fl_flags & FL_POSIX)) return -ENOLCK; - if (__mandatory_lock(inode)) + if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) return -ENOLCK; return ocfs2_plock(osb->cconn, OCFS2_I(inode)->ip_blkno, file, cmd, fl);