NFS: grab open context in direct read
authorFred Isaman <iisaman@netapp.com>
Fri, 20 Apr 2012 18:47:36 +0000 (14:47 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 27 Apr 2012 18:10:36 +0000 (14:10 -0400)
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/direct.c

index 481be7f7bdd3b953179a2ab354c9f05fc4773925..8a89423267585d9914600f882794de091ee30bf4 100644 (file)
@@ -260,7 +260,7 @@ static void nfs_direct_read_release(void *calldata)
 
        if (put_dreq(dreq))
                nfs_direct_complete(dreq);
-       nfs_readdata_free(data);
+       nfs_readdata_release(data);
 }
 
 static const struct rpc_call_ops nfs_read_direct_ops = {
@@ -337,7 +337,7 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_direct_req *dreq,
                data->inode = inode;
                data->cred = msg.rpc_cred;
                data->args.fh = NFS_FH(inode);
-               data->args.context = ctx;
+               data->args.context = get_nfs_open_context(ctx);
                data->args.lock_context = dreq->l_ctx;
                data->args.offset = pos;
                data->args.pgbase = pgbase;