aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 1d84e7088af9..bcc29bdc9bee 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3195,12 +3195,9 @@ static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_messag
3195 msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_WRITE]; 3195 msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_WRITE];
3196} 3196}
3197 3197
3198static int nfs4_commit_done(struct rpc_task *task, struct nfs_write_data *data) 3198static int nfs4_commit_done_cb(struct rpc_task *task, struct nfs_write_data *data)
3199{ 3199{
3200 struct inode *inode = data->inode; 3200 struct inode *inode = data->inode;
3201
3202 if (!nfs4_sequence_done(task, &data->res.seq_res))
3203 return -EAGAIN;
3204 3201
3205 if (nfs4_async_handle_error(task, NFS_SERVER(inode), NULL) == -EAGAIN) { 3202 if (nfs4_async_handle_error(task, NFS_SERVER(inode), NULL) == -EAGAIN) {
3206 nfs_restart_rpc(task, NFS_SERVER(inode)->nfs_client); 3203 nfs_restart_rpc(task, NFS_SERVER(inode)->nfs_client);
@@ -3210,11 +3207,20 @@ static int nfs4_commit_done(struct rpc_task *task, struct nfs_write_data *data)
3210 return 0; 3207 return 0;
3211} 3208}
3212 3209
3210static int nfs4_commit_done(struct rpc_task *task, struct nfs_write_data *data)
3211{
3212 if (!nfs4_sequence_done(task, &data->res.seq_res))
3213 return -EAGAIN;
3214 return data->write_done_cb(task, data);
3215}
3216
3213static void nfs4_proc_commit_setup(struct nfs_write_data *data, struct rpc_message *msg) 3217static void nfs4_proc_commit_setup(struct nfs_write_data *data, struct rpc_message *msg)
3214{ 3218{
3215 struct nfs_server *server = NFS_SERVER(data->inode); 3219 struct nfs_server *server = NFS_SERVER(data->inode);
3216 3220
3217 data->args.bitmask = server->cache_consistency_bitmask; 3221 data->args.bitmask = server->cache_consistency_bitmask;
3222 if (!data->write_done_cb)
3223 data->write_done_cb = nfs4_commit_done_cb;
3218 data->res.server = server; 3224 data->res.server = server;
3219 msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMMIT]; 3225 msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMMIT];
3220} 3226}