[v5,06/38] SQUASHME: use be32 res in nfs4_callback_devicenotify
diff mbox

Message ID 1306108011-28016-1-git-send-email-bhalevy@panasas.com
State New, archived
Headers show

Commit Message

Benny Halevy May 22, 2011, 11:46 p.m. UTC
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/callback_proc.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Patch
diff mbox

diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 975c8f2..95107fe 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -245,14 +245,14 @@  __be32 nfs4_callback_devicenotify(struct cb_devicenotifyargs *args,
 				  void *dummy, struct cb_process_state *cps)
 {
 	int i;
-	u32 res = 0;
+	__be32 res = 0;
 	struct nfs_client *clp = cps->clp;
 	struct nfs_server *server = NULL;
 
 	dprintk("%s: -->\n", __func__);
 
 	if (!clp) {
-		res = NFS4ERR_OP_NOT_IN_SESSION;
+		res = cpu_to_be32(NFS4ERR_OP_NOT_IN_SESSION);
 		goto out;
 	}
 
@@ -276,7 +276,7 @@  __be32 nfs4_callback_devicenotify(struct cb_devicenotifyargs *args,
 
 	found:
 		if (!server->pnfs_curr_ld->delete_deviceid) {
-			res = NFS4ERR_NOTSUPP;
+			res = cpu_to_be32(NFS4ERR_NOTSUPP);
 			break;
 		}
 		if (dev->cbd_notify_type == NOTIFY_DEVICEID4_CHANGE)
@@ -288,8 +288,8 @@  __be32 nfs4_callback_devicenotify(struct cb_devicenotifyargs *args,
 out:
 	kfree(args->devs);
 	dprintk("%s: exit with status = %u\n",
-		__func__, res);
-	return cpu_to_be32(res);
+		__func__, be32_to_cpu(res));
+	return res;
 }
 
 int nfs41_validate_delegation_stateid(struct nfs_delegation *delegation, const nfs4_stateid *stateid)