summaryrefslogtreecommitdiff
path: root/fs/gfs2/trans.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-02-28 01:23:27 +0300
committerSteven Whitehouse <swhiteho@redhat.com>2006-02-28 01:23:27 +0300
commit5c676f6d359b0404d53f542f02e1359583cb2895 (patch)
tree8741011990ec0a3d0d41fee9f0d7abf6a16834cc /fs/gfs2/trans.c
parentf3b270a47882b958e9e3c5bd86894e3a7072899a (diff)
downloadlinux-5c676f6d359b0404d53f542f02e1359583cb2895.tar.xz
[GFS2] Macros removal in gfs2.h
As suggested by Pekka Enberg <penberg@cs.helsinki.fi>. The DIV_RU macro is renamed DIV_ROUND_UP and and moved to kernel.h The other macros are gone from gfs2.h as (although not requested by Pekka Enberg) are a number of included header file which are now included individually. The inode number comparison function is now an inline function. The DT2IF and IF2DT may be addressed in a future patch. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r--fs/gfs2/trans.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 0a0ea70eac4c..2cce68aec134 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -12,14 +12,18 @@
#include <linux/spinlock.h>
#include <linux/completion.h>
#include <linux/buffer_head.h>
+#include <linux/gfs2_ondisk.h>
#include <asm/semaphore.h>
#include "gfs2.h"
+#include "lm_interface.h"
+#include "incore.h"
#include "glock.h"
#include "log.h"
#include "lops.h"
#include "meta_io.h"
#include "trans.h"
+#include "util.h"
int gfs2_trans_begin_i(struct gfs2_sbd *sdp, unsigned int blocks,
unsigned int revokes, char *file, unsigned int line)
@@ -27,7 +31,7 @@ int gfs2_trans_begin_i(struct gfs2_sbd *sdp, unsigned int blocks,
struct gfs2_trans *tr;
int error;
- if (gfs2_assert_warn(sdp, !get_transaction) ||
+ if (gfs2_assert_warn(sdp, !current->journal_info) ||
gfs2_assert_warn(sdp, blocks || revokes)) {
fs_warn(sdp, "(%s, %u)\n", file, line);
return -EINVAL;
@@ -69,7 +73,7 @@ int gfs2_trans_begin_i(struct gfs2_sbd *sdp, unsigned int blocks,
if (error)
goto fail_gunlock;
- set_transaction(tr);
+ current->journal_info = tr;
return 0;
@@ -90,8 +94,8 @@ void gfs2_trans_end(struct gfs2_sbd *sdp)
struct gfs2_trans *tr;
struct gfs2_holder *t_gh;
- tr = get_transaction;
- set_transaction(NULL);
+ tr = current->journal_info;
+ current->journal_info = NULL;
if (gfs2_assert_warn(sdp, tr))
return;
@@ -147,12 +151,12 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta)
struct gfs2_sbd *sdp = gl->gl_sbd;
struct gfs2_bufdata *bd;
- bd = get_v2bd(bh);
+ bd = bh->b_private;
if (bd)
gfs2_assert(sdp, bd->bd_gl == gl);
else {
gfs2_attach_bufdata(gl, bh, meta);
- bd = get_v2bd(bh);
+ bd = bh->b_private;
}
lops_add(sdp, &bd->bd_le);
}
@@ -186,8 +190,9 @@ void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, uint64_t blkno)
gfs2_log_unlock(sdp);
if (found) {
+ struct gfs2_trans *tr = current->journal_info;
kfree(rv);
- get_transaction->tr_num_revoke_rm++;
+ tr->tr_num_revoke_rm++;
}
}