]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
RPC: stops the release_pipe() funtion from being called twice
authorSteve Dickson <steved@redhat.com>
Wed, 19 Oct 2005 06:19:40 +0000 (23:19 -0700)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 19 Oct 2005 06:19:40 +0000 (23:19 -0700)
 This patch stops the release_pipe() funtion from being called
 twice by invalidating the ops pointer in the rpc_inode
 when rpc_pipe_release() is called.

Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/rpc_pipe.c

index ded6c63f11ec968263890ebded1f65ea31f1f674..649d609e7d9484a8b323f1f07dfeb2526789b7e4 100644 (file)
@@ -177,6 +177,8 @@ rpc_pipe_release(struct inode *inode, struct file *filp)
                __rpc_purge_upcall(inode, -EPIPE);
        if (rpci->ops->release_pipe)
                rpci->ops->release_pipe(inode);
+       if (!rpci->nreaders && !rpci->nwriters)
+               rpci->ops = NULL;
 out:
        up(&inode->i_sem);
        return 0;