浏览代码

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 <vvs@sw.ru>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Vasily Averin 14 年之前
父节点
当前提交
82c2c8b861
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      fs/lockd/clntproc.c

+ 6 - 3
fs/lockd/clntproc.c

@@ -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 */
 				/* We appear to be out of the grace period */
 				wake_up_all(&host->h_gracewait);
 				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 */
 			return 0;	/* Okay, call complete */
 		}
 		}
 
 
@@ -690,7 +691,8 @@ nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl)
 		goto out;
 		goto out;
 
 
 	if (resp->status != nlm_lck_denied_nolocks)
 	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... */
 	/* What to do now? I'm out of my depth... */
 	status = -ENOLCK;
 	status = -ENOLCK;
 out:
 out:
@@ -843,6 +845,7 @@ nlm_stat_to_errno(__be32 status)
 		return -ENOLCK;
 		return -ENOLCK;
 #endif
 #endif
 	}
 	}
-	printk(KERN_NOTICE "lockd: unexpected server status %d\n", status);
+	printk(KERN_NOTICE "lockd: unexpected server status %d\n",
+		 ntohl(status));
 	return -ENOLCK;
 	return -ENOLCK;
 }
 }