[GFS2] Remove uneeded endian conversion

In many places GFS2 was calling the endian conversion routines
for an inode even when only a single field, or a few fields might
have changed. As a result we were copying lots of data needlessly.

This patch replaces those calls with conversion of just the
required fields in each case. This should be faster and easier
to understand. There are still other places which suffer from this
problem, but this is a start in the right direction.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index 811f4ad..4fb743f 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -460,7 +460,8 @@
 	struct gfs2_sbd *sdp = GFS2_SB(inode);
 	int error = -EOPNOTSUPP;
 	struct buffer_head *dibh;
-	struct gfs2_alloc *al = &ip->i_alloc;;
+	struct gfs2_alloc *al = &ip->i_alloc;
+	struct gfs2_dinode *di;
 
 	if (gfs2_assert_withdraw(sdp, gfs2_glock_is_locked_by_me(ip->i_gl)))
                 goto fail_nounlock;
@@ -470,6 +471,7 @@
 		goto fail_endtrans;
 
 	gfs2_trans_add_bh(ip->i_gl, dibh, 1);
+	di = (struct gfs2_dinode *)dibh->b_data;
 
 	if (gfs2_is_stuffed(ip)) {
 		u64 file_size;
@@ -495,10 +497,16 @@
 			goto fail;
 	}
 
-	if (ip->i_di.di_size < inode->i_size)
+	if (ip->i_di.di_size < inode->i_size) {
 		ip->i_di.di_size = inode->i_size;
+		di->di_size = cpu_to_be64(inode->i_size);
+	}
 
-	gfs2_dinode_out(&ip->i_di, dibh->b_data);
+	di->di_mode = cpu_to_be32(inode->i_mode);
+	di->di_atime = cpu_to_be64(inode->i_atime.tv_sec);
+	di->di_mtime = cpu_to_be64(inode->i_mtime.tv_sec);
+	di->di_ctime = cpu_to_be64(inode->i_ctime.tv_sec);
+
 	brelse(dibh);
 	gfs2_trans_end(sdp);
 	if (al->al_requested) {