aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
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);