From 484adff8a06cb5d952832f5487ae863f54c0fb69 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 29 Mar 2006 09:12:12 -0500 Subject: [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 --- fs/gfs2/trans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/gfs2/trans.c') diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 63e7fed..aa1a619 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, return 0; - fail_gunlock: +fail_gunlock: gfs2_glock_dq(&tr->tr_t_gh); - fail_holder_uninit: +fail_holder_uninit: gfs2_holder_uninit(&tr->tr_t_gh); kfree(tr); -- cgit v1.1