summaryrefslogtreecommitdiff
path: root/fs/nfs/blocklayout/blocklayoutdm.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-04-24 08:11:20 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-04-24 08:11:20 +0400
commit973e2abd15326114ff9a099d6dfe0ef6be6fc7e6 (patch)
tree06ef7573e06500a4999a755006eb9a95bdf85ffa /fs/nfs/blocklayout/blocklayoutdm.c
parent5676005acf26ab7e924a8438ea4746e47d405762 (diff)
parent016af59f0f8cd10f27773df8f0034b5f3b46a138 (diff)
downloadlinux-973e2abd15326114ff9a099d6dfe0ef6be6fc7e6.tar.xz
Merge remote-tracking branch 'mpe/master' into next
Merge the tentative powerpc-next branch maintained by Michael while I was on vacation
Diffstat (limited to 'fs/nfs/blocklayout/blocklayoutdm.c')
-rw-r--r--fs/nfs/blocklayout/blocklayoutdm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/blocklayout/blocklayoutdm.c b/fs/nfs/blocklayout/blocklayoutdm.c
index 737d839bc17b..6fc7b5cae92b 100644
--- a/fs/nfs/blocklayout/blocklayoutdm.c
+++ b/fs/nfs/blocklayout/blocklayoutdm.c
@@ -55,7 +55,8 @@ static void dev_remove(struct net *net, dev_t dev)
bl_pipe_msg.bl_wq = &nn->bl_wq;
memset(msg, 0, sizeof(*msg));
- msg->data = kzalloc(1 + sizeof(bl_umount_request), GFP_NOFS);
+ msg->len = sizeof(bl_msg) + bl_msg.totallen;
+ msg->data = kzalloc(msg->len, GFP_NOFS);
if (!msg->data)
goto out;
@@ -66,7 +67,6 @@ static void dev_remove(struct net *net, dev_t dev)
memcpy(msg->data, &bl_msg, sizeof(bl_msg));
dataptr = (uint8_t *) msg->data;
memcpy(&dataptr[sizeof(bl_msg)], &bl_umount_request, sizeof(bl_umount_request));
- msg->len = sizeof(bl_msg) + bl_msg.totallen;
add_wait_queue(&nn->bl_wq, &wq);
if (rpc_queue_upcall(nn->bl_device_pipe, msg) < 0) {