summaryrefslogtreecommitdiffstats
path: root/fs/nfs/unlink.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-14 15:39:59 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-30 02:05:30 -0500
commitc970aa85e71bd581726c42df843f6f129db275ac (patch)
treee7fc90ee4064196d357045fd173764e0b8fc8ca8 /fs/nfs/unlink.c
parent84115e1cd4a3614c4e566d4cce31381dce3dbef9 (diff)
downloadlinux-c970aa85e71bd581726c42df843f6f129db275ac.tar.gz
linux-c970aa85e71bd581726c42df843f6f129db275ac.tar.bz2
linux-c970aa85e71bd581726c42df843f6f129db275ac.zip
SUNRPC: Clean up rpc_run_task
Make it use the new task initialiser structure instead of acting as a wrapper. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/unlink.c')
-rw-r--r--fs/nfs/unlink.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c
index 8e5428e0b86f..6660d9a53345 100644
--- a/fs/nfs/unlink.c
+++ b/fs/nfs/unlink.c
@@ -127,6 +127,11 @@ static const struct rpc_call_ops nfs_unlink_ops = {
static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct nfs_unlinkdata *data)
{
+ struct rpc_task_setup task_setup_data = {
+ .callback_ops = &nfs_unlink_ops,
+ .callback_data = data,
+ .flags = RPC_TASK_ASYNC,
+ };
struct rpc_task *task;
struct dentry *alias;
@@ -160,7 +165,9 @@ static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct n
data->args.fh = NFS_FH(dir);
nfs_fattr_init(&data->res.dir_attr);
- task = rpc_run_task(NFS_CLIENT(dir), RPC_TASK_ASYNC, &nfs_unlink_ops, data);
+ task_setup_data.rpc_client = NFS_CLIENT(dir);
+
+ task = rpc_run_task(&task_setup_data);
if (!IS_ERR(task))
rpc_put_task(task);
return 1;