]> bbs.cooldavid.org Git - net-next-2.6.git/commit - fs/gfs2/ops_fstype.c
[GFS2] Update locking in log.c
authorSteven Whitehouse <swhiteho@redhat.com>
Wed, 29 Mar 2006 14:12:12 +0000 (09:12 -0500)
committerSteven Whitehouse <swhiteho@redhat.com>
Wed, 29 Mar 2006 14:12:12 +0000 (09:12 -0500)
commit484adff8a06cb5d952832f5487ae863f54c0fb69
treee43a9387a3a313cfdb4a34298d532dc7a1b7391c
parent7aabffcab47a0f881c7640f5c108e8d3f2e35ebf
[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>
fs/gfs2/incore.h
fs/gfs2/log.c
fs/gfs2/ops_fstype.c
fs/gfs2/trans.c