aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-10-02 12:39:19 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-10-02 12:39:19 -0400
commit48516ced21e83a755ebae3d1ed03f1731befc391 (patch)
tree9cf3c78506056d36909ce8da5560162d4c0fbc17 /fs/gfs2/inode.c
parent3cf1e7bed4681bdb1c14b6e146ae9c0afb6c1552 (diff)
[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>
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 57a4c8b68587..660dc81849a6 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -1166,6 +1166,7 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh)
1166 curtime = get_seconds(); 1166 curtime = get_seconds();
1167 if (curtime - ip->i_di.di_atime >= quantum) { 1167 if (curtime - ip->i_di.di_atime >= quantum) {
1168 struct buffer_head *dibh; 1168 struct buffer_head *dibh;
1169 struct gfs2_dinode *di;
1169 1170
1170 error = gfs2_trans_begin(sdp, RES_DINODE, 0); 1171 error = gfs2_trans_begin(sdp, RES_DINODE, 0);
1171 if (error == -EROFS) 1172 if (error == -EROFS)
@@ -1180,7 +1181,8 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh)
1180 ip->i_di.di_atime = curtime; 1181 ip->i_di.di_atime = curtime;
1181 1182
1182 gfs2_trans_add_bh(ip->i_gl, dibh, 1); 1183 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
1183 gfs2_dinode_out(&ip->i_di, dibh->b_data); 1184 di = (struct gfs2_dinode *)dibh->b_data;
1185 di->di_atime = cpu_to_be64(ip->i_di.di_atime);
1184 brelse(dibh); 1186 brelse(dibh);
1185 1187
1186 gfs2_trans_end(sdp); 1188 gfs2_trans_end(sdp);