sunrpc: don't wait for write before allowing reads from use-gss-proxy file
authorJeff Layton <jlayton@redhat.com>
Sat, 4 Jan 2014 12:18:03 +0000 (07:18 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 6 Jan 2014 20:14:16 +0000 (15:14 -0500)
It doesn't make much sense to make reads from this procfile hang. As
far as I can tell, only gssproxy itself will open this file and it
never reads from it. Change it to just give the present setting of
sn->use_gss_proxy without waiting for anything.

Note that we do not want to call use_gss_proxy() in this codepath
since an inopportune read of this file could cause it to be disabled
prematurely.

Cc: stable@vger.kernel.org
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/auth_gss/gss_rpc_upcall.c
net/sunrpc/auth_gss/svcauth_gss.c
net/sunrpc/netns.h

index 458f85e..abbb7dc 100644 (file)
@@ -137,7 +137,6 @@ void init_gssp_clnt(struct sunrpc_net *sn)
 {
        mutex_init(&sn->gssp_lock);
        sn->gssp_clnt = NULL;
-       init_waitqueue_head(&sn->gssp_wq);
 }
 
 int set_gssp_clnt(struct net *net)
@@ -154,7 +153,6 @@ int set_gssp_clnt(struct net *net)
                sn->gssp_clnt = clnt;
        }
        mutex_unlock(&sn->gssp_lock);
-       wake_up(&sn->gssp_wq);
        return ret;
 }
 
Simple merge
Simple merge