SUNRPC: IS_ERR/PTR_ERR confusion
Subsystems (3)
PATCH 1/1 SUNRPC: IS_ERR/PTR_ERR confusion
IS_ERR returns 1 or 0, PTR_ERR returns the error value.
--- net/sunrpc/auth_gss/auth_gss.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/sunrpc/auth_gss/auth_gss.c +1 -1
@@ -485,7 +485,7 @@ gss_refresh_upcall(struct rpc_task *task)dprintk ("RPC: %5u gss_refresh_upcall for uid %u\n" , task->tk_pid, cred->cr_uid); gss_msg =gss_setup_upcall (task->tk_client, gss_auth, cred); -if (IS_ERR (gss_msg) == -EAGAIN ) { +if (PTR_ERR (gss_msg) == -EAGAIN ) {/* XXX: warning on the first, under the assumption we * shouldn't normally hit this case on a refresh. */ warn_gssd ();
Quoted 1 line · Roel Kluin
IS_ERRreturns 1 or 0,PTR_ERRreturns the error value.
Whoops, thanks, looks like that was my mistake, from 79a3f20b641f9f93787ada49d1d7cfa98ee5a11e "rpc: use count of pipe openers to wait for first open".
--b.
Quoted 19 lines
Signed-off-by Roel Kluin <[email protected]>--- net/sunrpc/auth_gss/auth_gss.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)net/sunrpc/auth_gss/auth_gss.c +1
-1@@ -485,7 +485,7 @@ gss_refresh_upcall(struct rpc_task *task)dprintk ("RPC: %5u gss_refresh_upcall for uid %u\n" , task->tk_pid, cred->cr_uid); gss_msg =gss_setup_upcall (task->tk_client, gss_auth, cred); -if (IS_ERR (gss_msg) == -EAGAIN ) { +if (PTR_ERR (gss_msg) == -EAGAIN ) {/* XXX: warning on the first, under the assumption we * shouldn't normally hit this case on a refresh. */ warn_gssd ();
Quoted 6 lines · J. Bruce Fields
Quoted 1 line · Roel Kluin
IS_ERRreturns 1 or 0,PTR_ERRreturns the error value.Whoops, thanks, looks like that was my mistake, from
79a3f20b641f9f93787ada49d1d7cfa98ee5a11e"rpc: use count of pipe openers to wait for first open".
Are you planning on shepherding this fix into mainline, or should I?
Trond
Quoted 11 lines · Trond Myklebust
Quoted 6 lines · J. Bruce Fields
Quoted 1 line · Roel Kluin
IS_ERRreturns 1 or 0,PTR_ERRreturns the error value.Whoops, thanks, looks like that was my mistake, from
79a3f20b641f9f93787ada49d1d7cfa98ee5a11e"rpc: use count of pipe openers to wait for first open".Are you planning on shepherding this fix into mainline, or should I?
Trond
BTW: It should probably be labelled as 'Cc: [email protected]' since it appears to be a 2.6.29 bug...
Trond
Quoted 9 lines · Trond Myklebust
Quoted 6 lines · J. Bruce Fields
Quoted 1 line · Roel Kluin
IS_ERRreturns 1 or 0,PTR_ERRreturns the error value.Whoops, thanks, looks like that was my mistake, from
79a3f20b641f9f93787ada49d1d7cfa98ee5a11e"rpc: use count of pipe openers to wait for first open".Are you planning on shepherding this fix into mainline, or should I?
I don't care, but I think of that as client-side code, so I'm assuming you're taking it.
--b.
Quoted 5 lines · J. Bruce Fields
Quoted 1 line · Trond Myklebust
Are you planning on shepherding this fix into mainline, or should I?
I don't care, but I think of that as client-side code, so I'm assuming you're taking it.
OK. Will do...