]> Pileus Git - ~andy/linux/commit
SUNRPC: fix pipe->ops cleanup on pipe dentry unlink
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Tue, 10 Jan 2012 12:12:38 +0000 (16:12 +0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 31 Jan 2012 23:20:26 +0000 (18:20 -0500)
commitad6b134008f4e765dd19976552b929273ae523bd
tree5f5fbafe5739155cfce6bb0b1e07a9418a72666f
parent39cb67b9a04300df41e201d9e6392691cdad080f
SUNRPC: fix pipe->ops cleanup on pipe dentry unlink

This patch looks late due to GSS AUTH patches sent already. But it fixes a flaw
in RPC PipeFS pipes handling.
I've added this patch in the series, because this series related to pipes. But
it should be a part of previous series named "SUNPRC: cleanup PipeFS for
network-namespace-aware users".

Pipe dentry can be created and destroyed many times during pipe life cycle.
This actually means, that we can't set pipe->ops to NULL in rpc_close_pipes()
and use this variable as a flag, indicating, that pipe's dentry is unlinking.
To follow this restriction, this patch replaces "pipe->ops = NULL" assignment
and checks for NULL with "pipe->dentry = NULL" assignment and checks for
NULL respectively.
This patch also removes check for non-NULL pipe->ops (or pipe->dentry) in
rpc_close_pipes() because it always non-NULL now.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/rpc_pipe.c