aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/trans.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-03-29 09:12:12 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-03-29 09:12:12 -0500
commit484adff8a06cb5d952832f5487ae863f54c0fb69 (patch)
treee43a9387a3a313cfdb4a34298d532dc7a1b7391c /fs/gfs2/trans.c
parent7aabffcab47a0f881c7640f5c108e8d3f2e35ebf (diff)
[GFS2] Update locking in log.c
Replace the lock_for_trans()/lock_for_flush() functions with an rwsem. In fact the sd_log_flush_lock becomes an rwsem (the write part of it) and is extended slightly to cover everything that the lock_for_flush() used to cover. The read part of the lock is instead of lock_for_trans(). This corrects the races in the original code and reduces the code size. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r--fs/gfs2/trans.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 63e7fed2bd47..aa1a619f0854 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -74,10 +74,10 @@ int gfs2_trans_begin_i(struct gfs2_sbd *sdp, unsigned int blocks,
74 74
75 return 0; 75 return 0;
76 76
77 fail_gunlock: 77fail_gunlock:
78 gfs2_glock_dq(&tr->tr_t_gh); 78 gfs2_glock_dq(&tr->tr_t_gh);
79 79
80 fail_holder_uninit: 80fail_holder_uninit:
81 gfs2_holder_uninit(&tr->tr_t_gh); 81 gfs2_holder_uninit(&tr->tr_t_gh);
82 kfree(tr); 82 kfree(tr);
83 83