diff options
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 4794ca693367..e793aa91454a 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -4033,12 +4033,12 @@ static bool nfs4_error_stateid_expired(int err) | |||
4033 | return false; | 4033 | return false; |
4034 | } | 4034 | } |
4035 | 4035 | ||
4036 | void __nfs4_read_done_cb(struct nfs_read_data *data) | 4036 | void __nfs4_read_done_cb(struct nfs_pgio_data *data) |
4037 | { | 4037 | { |
4038 | nfs_invalidate_atime(data->header->inode); | 4038 | nfs_invalidate_atime(data->header->inode); |
4039 | } | 4039 | } |
4040 | 4040 | ||
4041 | static int nfs4_read_done_cb(struct rpc_task *task, struct nfs_read_data *data) | 4041 | static int nfs4_read_done_cb(struct rpc_task *task, struct nfs_pgio_data *data) |
4042 | { | 4042 | { |
4043 | struct nfs_server *server = NFS_SERVER(data->header->inode); | 4043 | struct nfs_server *server = NFS_SERVER(data->header->inode); |
4044 | 4044 | ||
@@ -4068,7 +4068,7 @@ static bool nfs4_read_stateid_changed(struct rpc_task *task, | |||
4068 | return true; | 4068 | return true; |
4069 | } | 4069 | } |
4070 | 4070 | ||
4071 | static int nfs4_read_done(struct rpc_task *task, struct nfs_read_data *data) | 4071 | static int nfs4_read_done(struct rpc_task *task, struct nfs_pgio_data *data) |
4072 | { | 4072 | { |
4073 | 4073 | ||
4074 | dprintk("--> %s\n", __func__); | 4074 | dprintk("--> %s\n", __func__); |
@@ -4077,19 +4077,19 @@ static int nfs4_read_done(struct rpc_task *task, struct nfs_read_data *data) | |||
4077 | return -EAGAIN; | 4077 | return -EAGAIN; |
4078 | if (nfs4_read_stateid_changed(task, &data->args)) | 4078 | if (nfs4_read_stateid_changed(task, &data->args)) |
4079 | return -EAGAIN; | 4079 | return -EAGAIN; |
4080 | return data->read_done_cb ? data->read_done_cb(task, data) : | 4080 | return data->pgio_done_cb ? data->pgio_done_cb(task, data) : |
4081 | nfs4_read_done_cb(task, data); | 4081 | nfs4_read_done_cb(task, data); |
4082 | } | 4082 | } |
4083 | 4083 | ||
4084 | static void nfs4_proc_read_setup(struct nfs_read_data *data, struct rpc_message *msg) | 4084 | static void nfs4_proc_read_setup(struct nfs_pgio_data *data, struct rpc_message *msg) |
4085 | { | 4085 | { |
4086 | data->timestamp = jiffies; | 4086 | data->timestamp = jiffies; |
4087 | data->read_done_cb = nfs4_read_done_cb; | 4087 | data->pgio_done_cb = nfs4_read_done_cb; |
4088 | msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ]; | 4088 | msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ]; |
4089 | nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 0); | 4089 | nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 0); |
4090 | } | 4090 | } |
4091 | 4091 | ||
4092 | static int nfs4_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_data *data) | 4092 | static int nfs4_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_pgio_data *data) |
4093 | { | 4093 | { |
4094 | if (nfs4_setup_sequence(NFS_SERVER(data->header->inode), | 4094 | if (nfs4_setup_sequence(NFS_SERVER(data->header->inode), |
4095 | &data->args.seq_args, | 4095 | &data->args.seq_args, |
@@ -4104,7 +4104,7 @@ static int nfs4_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_dat | |||
4104 | return 0; | 4104 | return 0; |
4105 | } | 4105 | } |
4106 | 4106 | ||
4107 | static int nfs4_write_done_cb(struct rpc_task *task, struct nfs_write_data *data) | 4107 | static int nfs4_write_done_cb(struct rpc_task *task, struct nfs_pgio_data *data) |
4108 | { | 4108 | { |
4109 | struct inode *inode = data->header->inode; | 4109 | struct inode *inode = data->header->inode; |
4110 | 4110 | ||
@@ -4134,18 +4134,18 @@ static bool nfs4_write_stateid_changed(struct rpc_task *task, | |||
4134 | return true; | 4134 | return true; |
4135 | } | 4135 | } |
4136 | 4136 | ||
4137 | static int nfs4_write_done(struct rpc_task *task, struct nfs_write_data *data) | 4137 | static int nfs4_write_done(struct rpc_task *task, struct nfs_pgio_data *data) |
4138 | { | 4138 | { |
4139 | if (!nfs4_sequence_done(task, &data->res.seq_res)) | 4139 | if (!nfs4_sequence_done(task, &data->res.seq_res)) |
4140 | return -EAGAIN; | 4140 | return -EAGAIN; |
4141 | if (nfs4_write_stateid_changed(task, &data->args)) | 4141 | if (nfs4_write_stateid_changed(task, &data->args)) |
4142 | return -EAGAIN; | 4142 | return -EAGAIN; |
4143 | return data->write_done_cb ? data->write_done_cb(task, data) : | 4143 | return data->pgio_done_cb ? data->pgio_done_cb(task, data) : |
4144 | nfs4_write_done_cb(task, data); | 4144 | nfs4_write_done_cb(task, data); |
4145 | } | 4145 | } |
4146 | 4146 | ||
4147 | static | 4147 | static |
4148 | bool nfs4_write_need_cache_consistency_data(const struct nfs_write_data *data) | 4148 | bool nfs4_write_need_cache_consistency_data(const struct nfs_pgio_data *data) |
4149 | { | 4149 | { |
4150 | const struct nfs_pgio_header *hdr = data->header; | 4150 | const struct nfs_pgio_header *hdr = data->header; |
4151 | 4151 | ||
@@ -4158,7 +4158,7 @@ bool nfs4_write_need_cache_consistency_data(const struct nfs_write_data *data) | |||
4158 | return nfs4_have_delegation(hdr->inode, FMODE_READ) == 0; | 4158 | return nfs4_have_delegation(hdr->inode, FMODE_READ) == 0; |
4159 | } | 4159 | } |
4160 | 4160 | ||
4161 | static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_message *msg) | 4161 | static void nfs4_proc_write_setup(struct nfs_pgio_data *data, struct rpc_message *msg) |
4162 | { | 4162 | { |
4163 | struct nfs_server *server = NFS_SERVER(data->header->inode); | 4163 | struct nfs_server *server = NFS_SERVER(data->header->inode); |
4164 | 4164 | ||
@@ -4168,8 +4168,8 @@ static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_messag | |||
4168 | } else | 4168 | } else |
4169 | data->args.bitmask = server->cache_consistency_bitmask; | 4169 | data->args.bitmask = server->cache_consistency_bitmask; |
4170 | 4170 | ||
4171 | if (!data->write_done_cb) | 4171 | if (!data->pgio_done_cb) |
4172 | data->write_done_cb = nfs4_write_done_cb; | 4172 | data->pgio_done_cb = nfs4_write_done_cb; |
4173 | data->res.server = server; | 4173 | data->res.server = server; |
4174 | data->timestamp = jiffies; | 4174 | data->timestamp = jiffies; |
4175 | 4175 | ||
@@ -4177,7 +4177,7 @@ static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_messag | |||
4177 | nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 1); | 4177 | nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 1); |
4178 | } | 4178 | } |
4179 | 4179 | ||
4180 | static int nfs4_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_write_data *data) | 4180 | static int nfs4_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_pgio_data *data) |
4181 | { | 4181 | { |
4182 | if (nfs4_setup_sequence(NFS_SERVER(data->header->inode), | 4182 | if (nfs4_setup_sequence(NFS_SERVER(data->header->inode), |
4183 | &data->args.seq_args, | 4183 | &data->args.seq_args, |