aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAbhijith Das <adas@redhat.com>2006-07-21 02:03:21 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-07-21 02:03:21 -0400
commit52f341cf75d2da84811127582616984eb0602360 (patch)
treefcefaa95a8813102f1f96e47cb772cc233f78be8 /fs
parentc5921fd02e6c720938141a45f1f9dbd71b17fff2 (diff)
[GFS2] gfs2_set_flags double locking patch
traced the "umount hang due to spurious glock" issue that I was having with gfs2meta. It's in the do_gfs2_set_flags function, which does a gfs2_holder_init as well as a gfs2_glock_nq_init (increases ref count by 2 instead of 1). Signed-off-by: Abhijith Das <adas@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/ops_file.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 26f1d3249b0f..6764ca69bc52 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -608,12 +608,9 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask)
608 int error; 608 int error;
609 u32 new_flags, flags; 609 u32 new_flags, flags;
610 610
611 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
612 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); 611 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
613 if (error) { 612 if (error)
614 gfs2_holder_uninit(&gh);
615 return error; 613 return error;
616 }
617 614
618 flags = ip->i_di.di_flags; 615 flags = ip->i_di.di_flags;
619 new_flags = (flags & ~mask) | (reqflags & mask); 616 new_flags = (flags & ~mask) | (reqflags & mask);