pnfsblock: remove rpc_call_ops from struct parallel_io
authorPeng Tao <bergwolf@gmail.com>
Thu, 12 Jan 2012 15:18:44 +0000 (23:18 +0800)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 12 Jan 2012 21:52:10 +0000 (16:52 -0500)
block layout can just make use of generic read/write_done.

Signed-off-by: Peng Tao <peng_tao@emc.com>
Signed-off-by: Benny Halevy <bhalevy@tonian.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/blocklayout/blocklayout.c

index 234273621854365f97d0c8081aa0d2a1aa68f8c5..9215c6644a3af615b64475bfa9484d5fd589a524 100644 (file)
@@ -90,7 +90,6 @@ static int is_writable(struct pnfs_block_extent *be, sector_t isect)
  */
 struct parallel_io {
        struct kref refcnt;
-       struct rpc_call_ops call_ops;
        void (*pnfs_callback) (void *data);
        void *data;
 };
@@ -226,14 +225,6 @@ bl_end_par_io_read(void *data)
        schedule_work(&rdata->task.u.tk_work);
 }
 
-/* We don't want normal .rpc_call_done callback used, so we replace it
- * with this stub.
- */
-static void bl_rpc_do_nothing(struct rpc_task *task, void *calldata)
-{
-       return;
-}
-
 static enum pnfs_try_status
 bl_read_pagelist(struct nfs_read_data *rdata)
 {
@@ -253,8 +244,6 @@ bl_read_pagelist(struct nfs_read_data *rdata)
        par = alloc_parallel(rdata);
        if (!par)
                goto use_mds;
-       par->call_ops = *rdata->mds_ops;
-       par->call_ops.rpc_call_done = bl_rpc_do_nothing;
        par->pnfs_callback = bl_end_par_io_read;
        /* At this point, we can no longer jump to use_mds */
 
@@ -564,8 +553,6 @@ bl_write_pagelist(struct nfs_write_data *wdata, int sync)
        par = alloc_parallel(wdata);
        if (!par)
                return PNFS_NOT_ATTEMPTED;
-       par->call_ops = *wdata->mds_ops;
-       par->call_ops.rpc_call_done = bl_rpc_do_nothing;
        par->pnfs_callback = bl_end_par_io_write;
        /* At this point, have to be more careful with error handling */