diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2012-03-12 11:33:00 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-12 12:51:42 -0400 |
commit | 11588f493a2441f09ceb2088d07cc012b53cbf75 (patch) | |
tree | f1f0f598ee239edd9e423bc745d1be77641ce36c /fs/nfs/idmap.c | |
parent | 4b7c8dd205d6df1629ccde9f6dcf6a85d34c37ff (diff) |
NFS: Check return value from rpc_queue_upcall()
This function could fail to queue the upcall if rpc.idmapd is not running,
causing a warning message to be printed. Instead, I want to check the
return value and revoke the key if the upcall can't be run.
Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/idmap.c')
-rw-r--r-- | fs/nfs/idmap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index f9f89fc83ee0..a701a83047d3 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c | |||
@@ -656,14 +656,19 @@ static int nfs_idmap_legacy_upcall(struct key_construction *cons, | |||
656 | 656 | ||
657 | idmap->idmap_key_cons = cons; | 657 | idmap->idmap_key_cons = cons; |
658 | 658 | ||
659 | return rpc_queue_upcall(idmap->idmap_pipe, msg); | 659 | ret = rpc_queue_upcall(idmap->idmap_pipe, msg); |
660 | if (ret < 0) | ||
661 | goto out2; | ||
662 | |||
663 | return ret; | ||
660 | 664 | ||
661 | out2: | 665 | out2: |
662 | kfree(im); | 666 | kfree(im); |
663 | out1: | 667 | out1: |
664 | kfree(msg); | 668 | kfree(msg); |
665 | out0: | 669 | out0: |
666 | complete_request_key(cons, ret); | 670 | key_revoke(cons->key); |
671 | key_revoke(cons->authkey); | ||
667 | return ret; | 672 | return ret; |
668 | } | 673 | } |
669 | 674 | ||