summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2011-05-28 14:44:46 +0200
committerJens Axboe <jaxboe@fusionio.com>2011-05-28 14:44:46 +0200
commit35fbf5bcf497d6ddbe7b6478141e7526d1474ff5 (patch)
tree1f2ecd1038aa175fd6a1086e06665cc134e13f56
parent6df87e65dbe4528ef07b917af89913abb8caaaba (diff)
nbd: pass MSG_* flags to kernel_recvmsg()
Unlike kernel_sendmsg(), kernel_recvmsg() requires passing flags explicitly via last parameter instead of struct msghdr.msg_flags. Therefore calls to sock_xmit(lo, 0, ..., MSG_WAITALL) have not been processed properly by tcp layer wrt. the flag. Fix it. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: Paul Clements <Paul.Clements@steeleye.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
-rw-r--r--drivers/block/nbd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index e6fc716aca45..1df3bfe5225b 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -192,7 +192,8 @@ static int sock_xmit(struct nbd_device *lo, int send, void *buf, int size,
if (lo->xmit_timeout)
del_timer_sync(&ti);
} else
- result = kernel_recvmsg(sock, &msg, &iov, 1, size, 0);
+ result = kernel_recvmsg(sock, &msg, &iov, 1, size,
+ msg.msg_flags);
if (signal_pending(current)) {
siginfo_t info;