[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>
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 0a0ea70..2cce68a 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 @@
 	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 @@
 	if (error)
 		goto fail_gunlock;
 
-	set_transaction(tr);
+	current->journal_info = tr;
 
 	return 0;
 
@@ -90,8 +94,8 @@
 	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 @@
 	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 @@
 	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++;
 	}
 }