From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Tue, 02 Jun 2009 09:08:52 +0100 Subject: [Cluster-devel] [GFS2 PATCH] bz502531 - GFS2: smbd proccess hangs with flock() call. In-Reply-To: <4A24101B.5020301@redhat.com> References: <1243624260.3431.6.camel@localhost.localdomain> <4A24101B.5020301@redhat.com> Message-ID: <1243930132.29604.547.camel@localhost.localdomain> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Now applied to the -nmw git tree. Thanks, Steve. On Mon, 2009-06-01 at 12:30 -0500, Abhijith Das wrote: > GFS2 currently does not support mandatory flocks. An flock() call with > LOCK_MAND triggers unexpected behavior because gfs2 is not checking for > this lock type. This patch corrects that. > > Signed-off-by: Abhi Das > plain text document attachment (bz502531-git.patch) > diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c > index 73b6f55..841ddc9 100644 > --- a/fs/gfs2/file.c > +++ b/fs/gfs2/file.c > @@ -698,8 +698,8 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl) > > if (!(fl->fl_flags & FL_FLOCK)) > return -ENOLCK; > - if (__mandatory_lock(&ip->i_inode)) > - return -ENOLCK; > + if (fl->fl_type & LOCK_MAND) > + return -EOPNOTSUPP; > > if (fl->fl_type == F_UNLCK) { > do_unflock(file, fl);