lockd: properly convert be32 values in debug messages
Subsystems (2)
PATCH 2/2 lockd: properly convert be32 values in debug messages
From be1e4fa45aa0c828d2e864c160857a41d2de0531 Mon Sep 17 00:00:00 2001
From: Vasily Averin <[email protected]>
Date: Wed, 1 Jun 2011 16:54:32 +0400
Subject: [PATCH 2/2] lockd: properly convert be32 values in debug messages
lockd: server returns status 50331648
it's quite hard to understand that number in this message is 3 in big endian
Signed-off-by Vasily Averin <[email protected]>
--- fs/lockd/clntproc.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
fs/lockd/clntproc.c +6 -3
@@ -302,7 +302,8 @@ nlmclnt_call(struct rpc_cred *cred, struct nlm_rqst *req, u32 proc)/* We appear to be out of the grace period */ wake_up_all (&host->h_gracewait); } -dprintk ("lockd: server returns status %d\n" , resp->status); +dprintk ("lockd: server returns status %d\n" , +ntohl (resp->status));return 0 ;/* Okay, call complete */ }
@@ -690,7 +691,8 @@ nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl) goto out;if (resp->status != nlm_lck_denied_nolocks) -printk ("lockd: unexpected unlock status: %d\n" , resp->status); +printk ("lockd: unexpected unlock status: %d\n" , +ntohl (resp->status));/* What to do now? I'm out of my depth... */ status = -ENOLCK ; out:
@@ -837,6 +839,7 @@ nlm_stat_to_errno(__be32 status)return -ENOLCK ;#endif } -printk (KERN_NOTICE "lockd: unexpected server status %d\n" , status); +printk (KERN_NOTICE "lockd: unexpected server status %d\n" , +ntohl (status));return -ENOLCK ; }
Signature · 1 line
1.7.4.1
Hi Vasily-
Please post patches inline, not as attachments.
Quoted 1 line · Vasily Averin
<diff-sunrpc-debug-20110601-2.txt>
Use be32_to_cpu() or be32_to_cpup(), not ntohl(). Thanks.
Signature · 2 lines
Chuck Lever chuck[dot]lever[at]oracle[dot]com