Skip to contentSkip to conversation

SUNRPC: IS_ERR/PTR_ERR confusion

PATCH In review Roel Kluin 3 participants 6 messages Dec 7, 2009

Subsystems (3)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

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
index fc6a43c..129d75e 100644
@@ -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();
#1 lore raw
Quoted 1 line · Roel Kluin

IS_ERR returns 1 or 0, PTR_ERR returns 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
---
 net/sunrpc/auth_gss/auth_gss.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/sunrpc/auth_gss/auth_gss.c +1 -1
index fc6a43c..129d75e 100644
@@ -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();
#2 lore raw
Quoted 6 lines · J. Bruce Fields
Quoted 1 line · Roel Kluin

IS_ERR returns 1 or 0, PTR_ERR returns 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

#3 lore raw
Quoted 11 lines · Trond Myklebust
Quoted 6 lines · J. Bruce Fields
Quoted 1 line · Roel Kluin

IS_ERR returns 1 or 0, PTR_ERR returns 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

#4 lore raw
In reply to Trond Myklebust
Quoted 9 lines · Trond Myklebust
Quoted 6 lines · J. Bruce Fields
Quoted 1 line · Roel Kluin

IS_ERR returns 1 or 0, PTR_ERR returns 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.

#5 lore raw
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...