diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-02 20:39:19 +0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-02 20:39:19 +0400 |
commit | 48516ced21e83a755ebae3d1ed03f1731befc391 (patch) | |
tree | 9cf3c78506056d36909ce8da5560162d4c0fbc17 /fs/gfs2/inode.c | |
parent | 3cf1e7bed4681bdb1c14b6e146ae9c0afb6c1552 (diff) | |
download | linux-48516ced21e83a755ebae3d1ed03f1731befc391.tar.xz |
[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.c | 4 |
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) curtime = get_seconds(); if (curtime - ip->i_di.di_atime >= quantum) { struct buffer_head *dibh; + struct gfs2_dinode *di; error = gfs2_trans_begin(sdp, RES_DINODE, 0); if (error == -EROFS) @@ -1180,7 +1181,8 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh) ip->i_di.di_atime = curtime; gfs2_trans_add_bh(ip->i_gl, dibh, 1); - gfs2_dinode_out(&ip->i_di, dibh->b_data); + di = (struct gfs2_dinode *)dibh->b_data; + di->di_atime = cpu_to_be64(ip->i_di.di_atime); brelse(dibh); gfs2_trans_end(sdp); |