aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorAbhijith Das <adas@redhat.com>2009-06-01 13:30:03 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2009-06-02 03:01:12 -0400
commita12af1ebe675e85831fde3c4d0908fc3b0908b7a (patch)
treeae03ea46bfa57031ee561f21d6e387fcdd7c46c7 /fs/gfs2
parentf6eb53498ee8f725832f3a0fffca90566bb118a6 (diff)
GFS2: smbd proccess hangs with flock() call.
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 <adas@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 73b6f552f06d..841ddc979388 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)
698 698
699 if (!(fl->fl_flags & FL_FLOCK)) 699 if (!(fl->fl_flags & FL_FLOCK))
700 return -ENOLCK; 700 return -ENOLCK;
701 if (__mandatory_lock(&ip->i_inode)) 701 if (fl->fl_type & LOCK_MAND)
702 return -ENOLCK; 702 return -EOPNOTSUPP;
703 703
704 if (fl->fl_type == F_UNLCK) { 704 if (fl->fl_type == F_UNLCK) {
705 do_unflock(file, fl); 705 do_unflock(file, fl);