From: Neil Brown <neilb@suse.de>
To: Mark Fasheh <mfasheh@suse.com>, Joel Becker <joel.becker@oracle.com>
Cc: linux-kernel@vger.kernel.org
Cc: Sachin Prabhu <sprabhu@redhat.com>
Subject: [PATCH] ocfs2: Skip check for mandatory locks when unlocking
Date: Tue, 23 Mar 2010 19:54:33 +1100 [thread overview]
Message-ID: <19368.33225.516492.542519@notabene.brown> (raw)
The nfs bug fixed by 0800c5f7a499a8961c3868e95cc4cf1715166457
and the 9p bug fixed by f78233dd44a110c574fe760ad6f9c1e8741a0d00
and the gfs2 bug fixed by 720e7749279bde0d08684b1bb4e7a2eedeec6394
also needs to be fixed for ocfs2. This patch does that.
Hopefully this is the last filesystem with this bug :-)
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
diff --git a/fs/ocfs2/locks.c b/fs/ocfs2/locks.c
index 544ac62..923d3d8 100644
--- a/fs/ocfs2/locks.c
+++ b/fs/ocfs2/locks.c
@@ -113,7 +113,8 @@ int ocfs2_flock(struct file *file, int cmd, struct file_lock *fl)
if (!(fl->fl_flags & FL_FLOCK))
return -ENOLCK;
- if (__mandatory_lock(inode))
+ if (__mandatory_lock(inode) &&
+ fl->fl_type != F_UNLCK)
return -ENOLCK;
if ((osb->s_mount_opt & OCFS2_MOUNT_LOCALFLOCKS) ||
next reply other threads:[~2010-03-23 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-23 8:54 Neil Brown [this message]
2010-03-25 14:05 ` Boaz Harrosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19368.33225.516492.542519@notabene.brown \
--to=neilb@suse.de \
--cc=joel.becker@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mfasheh@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®