diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-07-02 01:22:14 +0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-07-02 01:22:24 +0400 |
commit | 0de934936b731ca49ece266284da3c7cb402c74e (patch) | |
tree | 70aa071d779de71d04585f8d4325c230f231aba8 /net/sunrpc/auth_gss/svcauth_gss.c | |
parent | 1a9357f443d64aa41e9b0dc414953663a6fcca19 (diff) | |
parent | afe3c3fd5392b2f0066930abc5dbd3f4b14a0f13 (diff) | |
download | linux-0de934936b731ca49ece266284da3c7cb402c74e.tar.xz |
Merge branch 'for-3.10' into 'for-3.11'
Merge bugfixes into my for-3.11 branch.
Diffstat (limited to 'net/sunrpc/auth_gss/svcauth_gss.c')
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 871c73c92165..29b4ba93ab3c 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -1287,7 +1287,7 @@ static bool use_gss_proxy(struct net *net) #ifdef CONFIG_PROC_FS -static bool set_gss_proxy(struct net *net, int type) +static int set_gss_proxy(struct net *net, int type) { struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); int ret = 0; @@ -1317,10 +1317,12 @@ static inline bool gssp_ready(struct sunrpc_net *sn) return false; } -static int wait_for_gss_proxy(struct net *net) +static int wait_for_gss_proxy(struct net *net, struct file *file) { struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); + if (file->f_flags & O_NONBLOCK && !gssp_ready(sn)) + return -EAGAIN; return wait_event_interruptible(sn->gssp_wq, gssp_ready(sn)); } @@ -1362,7 +1364,7 @@ static ssize_t read_gssp(struct file *file, char __user *buf, size_t len; int ret; - ret = wait_for_gss_proxy(net); + ret = wait_for_gss_proxy(net, file); if (ret) return ret; |