[GFS2] Clean up gfs2_trans_add_revoke()
authorSteven Whitehouse <swhiteho@redhat.com>
Mon, 3 Sep 2007 10:01:33 +0000 (11:01 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Wed, 10 Oct 2007 07:56:12 +0000 (08:56 +0100)
commit1ad38c437fa33f85ba4b6a85ea8c5478ee72d5bd
tree11a5fc7993ba9ae343fc72f03f9a11f312fd6128
parent0820ab517e1b100ee3f9584ec27f93309689ebe7
[GFS2] Clean up gfs2_trans_add_revoke()

The following alters gfs2_trans_add_revoke() to take a struct
gfs2_bufdata as an argument. This eliminates the memory allocation which
was previously required by making use of the already existing struct
gfs2_bufdata. It makes some sanity checks to ensure that the
gfs2_bufdata has been removed from all the lists before its recycled as
a revoke structure. This saves one memory allocation and one free per
revoke structure.

Also as a result, and to simplify the locking, since there is no longer
any blocking code in gfs2_trans_add_revoke() we must hold the log lock
whenever this function is called. This reduces the amount of times we
take and unlock the log lock.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/glops.c
fs/gfs2/log.c
fs/gfs2/lops.c
fs/gfs2/meta_io.c
fs/gfs2/trans.c
fs/gfs2/trans.h