소스 검색

RPC: stops the release_pipe() funtion from being called twice

 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>
Steve Dickson 19 년 전
부모
커밋
747c5534c9
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      net/sunrpc/rpc_pipe.c

+ 2 - 0
net/sunrpc/rpc_pipe.c

@@ -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;