From 9b9107a5a8b190e6cf09bbdf893869c6a9c482cc Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Mon, 27 Aug 2007 13:54:05 +0100 Subject: [GFS2] Move pin/unpin into lops.c, clean up locking gfs2_pin and gfs2_unpin are only used in lops.c, despite being defined in meta_io.c, so this patch moves them into lops.c and makes them static. At the same time, its possible to clean up the locking in the buf and databuf _lo_add() functions so that we only need to grab the spinlock once. Also we have to move lock_buffer() around the _lo_add() functions since we can't do that in gfs2_pin() any more since we hold the spinlock for the duration of that function. As a result, the code shrinks by 12 lines and we do far fewer operations when adding buffers to the log. It also makes the code somewhat easier to read & understand. Signed-off-by: Steven Whitehouse --- fs/gfs2/meta_io.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'fs/gfs2/meta_io.h') diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h index 527bf19d9690..fd67f07cd60e 100644 --- a/fs/gfs2/meta_io.h +++ b/fs/gfs2/meta_io.h @@ -50,9 +50,6 @@ int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh); void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh, int meta); -void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh); -void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh, - struct gfs2_ail *ai); void gfs2_meta_wipe(struct gfs2_inode *ip, u64 bstart, u32 blen); -- cgit v1.2.3-59-g8ed1b