diff options
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r-- | fs/nfs/read.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index e9dbdc8eafe6..efc121c494fe 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -153,16 +153,6 @@ static void nfs_readpage_release(struct nfs_page *req) | |||
153 | nfs_release_request(req); | 153 | nfs_release_request(req); |
154 | } | 154 | } |
155 | 155 | ||
156 | static void nfs_execute_read(struct nfs_read_data *data) | ||
157 | { | ||
158 | struct rpc_clnt *clnt = NFS_CLIENT(data->inode); | ||
159 | sigset_t oldset; | ||
160 | |||
161 | rpc_clnt_sigmask(clnt, &oldset); | ||
162 | rpc_execute(&data->task); | ||
163 | rpc_clnt_sigunmask(clnt, &oldset); | ||
164 | } | ||
165 | |||
166 | /* | 156 | /* |
167 | * Set up the NFS read request struct | 157 | * Set up the NFS read request struct |
168 | */ | 158 | */ |
@@ -172,12 +162,14 @@ static void nfs_read_rpcsetup(struct nfs_page *req, struct nfs_read_data *data, | |||
172 | { | 162 | { |
173 | struct inode *inode = req->wb_context->path.dentry->d_inode; | 163 | struct inode *inode = req->wb_context->path.dentry->d_inode; |
174 | int swap_flags = IS_SWAPFILE(inode) ? NFS_RPC_SWAPFLAGS : 0; | 164 | int swap_flags = IS_SWAPFILE(inode) ? NFS_RPC_SWAPFLAGS : 0; |
165 | struct rpc_task *task; | ||
175 | struct rpc_message msg = { | 166 | struct rpc_message msg = { |
176 | .rpc_argp = &data->args, | 167 | .rpc_argp = &data->args, |
177 | .rpc_resp = &data->res, | 168 | .rpc_resp = &data->res, |
178 | .rpc_cred = req->wb_context->cred, | 169 | .rpc_cred = req->wb_context->cred, |
179 | }; | 170 | }; |
180 | struct rpc_task_setup task_setup_data = { | 171 | struct rpc_task_setup task_setup_data = { |
172 | .task = &data->task, | ||
181 | .rpc_client = NFS_CLIENT(inode), | 173 | .rpc_client = NFS_CLIENT(inode), |
182 | .rpc_message = &msg, | 174 | .rpc_message = &msg, |
183 | .callback_ops = call_ops, | 175 | .callback_ops = call_ops, |
@@ -203,7 +195,6 @@ static void nfs_read_rpcsetup(struct nfs_page *req, struct nfs_read_data *data, | |||
203 | 195 | ||
204 | /* Set up the initial task struct. */ | 196 | /* Set up the initial task struct. */ |
205 | NFS_PROTO(inode)->read_setup(data, &msg); | 197 | NFS_PROTO(inode)->read_setup(data, &msg); |
206 | rpc_init_task(&data->task, &task_setup_data); | ||
207 | 198 | ||
208 | dprintk("NFS: %5u initiated read call (req %s/%Ld, %u bytes @ offset %Lu)\n", | 199 | dprintk("NFS: %5u initiated read call (req %s/%Ld, %u bytes @ offset %Lu)\n", |
209 | data->task.tk_pid, | 200 | data->task.tk_pid, |
@@ -212,7 +203,9 @@ static void nfs_read_rpcsetup(struct nfs_page *req, struct nfs_read_data *data, | |||
212 | count, | 203 | count, |
213 | (unsigned long long)data->args.offset); | 204 | (unsigned long long)data->args.offset); |
214 | 205 | ||
215 | nfs_execute_read(data); | 206 | task = rpc_run_task(&task_setup_data); |
207 | if (!IS_ERR(task)) | ||
208 | rpc_put_task(task); | ||
216 | } | 209 | } |
217 | 210 | ||
218 | static void | 211 | static void |