aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index cf1b339c3937..92c8bc4b5f97 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3175,6 +3175,11 @@ static int nfs4_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
3175 return err; 3175 return err;
3176} 3176}
3177 3177
3178void __nfs4_read_done_cb(struct nfs_read_data *data)
3179{
3180 nfs_invalidate_atime(data->inode);
3181}
3182
3178static int nfs4_read_done_cb(struct rpc_task *task, struct nfs_read_data *data) 3183static int nfs4_read_done_cb(struct rpc_task *task, struct nfs_read_data *data)
3179{ 3184{
3180 struct nfs_server *server = NFS_SERVER(data->inode); 3185 struct nfs_server *server = NFS_SERVER(data->inode);
@@ -3184,7 +3189,7 @@ static int nfs4_read_done_cb(struct rpc_task *task, struct nfs_read_data *data)
3184 return -EAGAIN; 3189 return -EAGAIN;
3185 } 3190 }
3186 3191
3187 nfs_invalidate_atime(data->inode); 3192 __nfs4_read_done_cb(data);
3188 if (task->tk_status > 0) 3193 if (task->tk_status > 0)
3189 renew_lease(server, data->timestamp); 3194 renew_lease(server, data->timestamp);
3190 return 0; 3195 return 0;
@@ -3198,7 +3203,8 @@ static int nfs4_read_done(struct rpc_task *task, struct nfs_read_data *data)
3198 if (!nfs4_sequence_done(task, &data->res.seq_res)) 3203 if (!nfs4_sequence_done(task, &data->res.seq_res))
3199 return -EAGAIN; 3204 return -EAGAIN;
3200 3205
3201 return data->read_done_cb(task, data); 3206 return data->read_done_cb ? data->read_done_cb(task, data) :
3207 nfs4_read_done_cb(task, data);
3202} 3208}
3203 3209
3204static void nfs4_proc_read_setup(struct nfs_read_data *data, struct rpc_message *msg) 3210static void nfs4_proc_read_setup(struct nfs_read_data *data, struct rpc_message *msg)
@@ -3243,7 +3249,8 @@ static int nfs4_write_done(struct rpc_task *task, struct nfs_write_data *data)
3243{ 3249{
3244 if (!nfs4_sequence_done(task, &data->res.seq_res)) 3250 if (!nfs4_sequence_done(task, &data->res.seq_res))
3245 return -EAGAIN; 3251 return -EAGAIN;
3246 return data->write_done_cb(task, data); 3252 return data->write_done_cb ? data->write_done_cb(task, data) :
3253 nfs4_write_done_cb(task, data);
3247} 3254}
3248 3255
3249/* Reset the the nfs_write_data to send the write to the MDS. */ 3256/* Reset the the nfs_write_data to send the write to the MDS. */