[pnfs] [PATCH 8/8] Added check for call/reply flag to xs_tcp_read_request()
Iyer, Rahul
Rahul.Iyer at netapp.com
Mon Apr 16 02:44:04 EDT 2007
Hi Benny,
> > diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index
> > 61cf741..a2083dc 100644
> > --- a/net/sunrpc/xprtsock.c
> > +++ b/net/sunrpc/xprtsock.c
> > @@ -686,15 +686,23 @@ static inline void xs_tcp_read_request(struct
> > rpc_xprt *xprt, skb_reader_t *desc
> >
> > /* Find and lock the request corresponding to this xid */
> > spin_lock(&xprt->transport_lock);
> > - req = xprt_lookup_rqst(xprt, xprt->tcp_xid);
> > - if (!req) {
> > - xprt->tcp_flags &= ~XPRT_COPY_DATA;
> > - dprintk("RPC: XID %08x request not found!\n",
> > - ntohl(xprt->tcp_xid));
> > + if (xprt->tcp_calldir == RPC_CALL) {
> > + dprintk("Callback received on backchannel!\n");
> > spin_unlock(&xprt->transport_lock);
> > +
> > + /* Ignore callbacks for now */
> > return;
> > }
> > -
> > + else {
>
> no need for else as the if {} above returns (this will also
> reduce this patch to the required minimum :)
>
The reason I have the if is because I plan to use the same routine to
read in the request as well, instead of reading it in elsewhere. The if
will just set a flag. For now, I'd like to have it in there... My next
set of patches should explain things.
Regards
Rahul
More information about the pNFS
mailing list