diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-26 02:42:54 +0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-01-30 10:05:39 +0300 |
commit | 0773769191d943358a8392fa86abd756d004c4b6 (patch) | |
tree | 2eeba848f7c1e6ba90696190f05db26c2f31655e /fs/nfs/read.c | |
parent | e8f5d77c8029ff8f5dcd1dfc133aac0bbbffd92b (diff) | |
download | linux-0773769191d943358a8392fa86abd756d004c4b6.tar.xz |
NFS/SUNRPC: Convert users of rpc_init_task+rpc_execute to rpc_run_task()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
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) nfs_release_request(req); } -static void nfs_execute_read(struct nfs_read_data *data) -{ - struct rpc_clnt *clnt = NFS_CLIENT(data->inode); - sigset_t oldset; - - rpc_clnt_sigmask(clnt, &oldset); - rpc_execute(&data->task); - rpc_clnt_sigunmask(clnt, &oldset); -} - /* * Set up the NFS read request struct */ @@ -172,12 +162,14 @@ static void nfs_read_rpcsetup(struct nfs_page *req, struct nfs_read_data *data, { struct inode *inode = req->wb_context->path.dentry->d_inode; int swap_flags = IS_SWAPFILE(inode) ? NFS_RPC_SWAPFLAGS : 0; + struct rpc_task *task; struct rpc_message msg = { .rpc_argp = &data->args, .rpc_resp = &data->res, .rpc_cred = req->wb_context->cred, }; struct rpc_task_setup task_setup_data = { + .task = &data->task, .rpc_client = NFS_CLIENT(inode), .rpc_message = &msg, .callback_ops = call_ops, @@ -203,7 +195,6 @@ static void nfs_read_rpcsetup(struct nfs_page *req, struct nfs_read_data *data, /* Set up the initial task struct. */ NFS_PROTO(inode)->read_setup(data, &msg); - rpc_init_task(&data->task, &task_setup_data); dprintk("NFS: %5u initiated read call (req %s/%Ld, %u bytes @ offset %Lu)\n", data->task.tk_pid, @@ -212,7 +203,9 @@ static void nfs_read_rpcsetup(struct nfs_page *req, struct nfs_read_data *data, count, (unsigned long long)data->args.offset); - nfs_execute_read(data); + task = rpc_run_task(&task_setup_data); + if (!IS_ERR(task)) + rpc_put_task(task); } static void |