diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2012-09-03 14:04:23 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-09 14:11:38 +0100 |
commit | 1393b59f8c46001c8dbd47078881483cf97813c3 (patch) | |
tree | 0093ab8ecaab9d125e21c01acb58d7309b161270 /drivers/block/drbd | |
parent | 70f17b6bd18dfe33f40db7573baa663b866be6ba (diff) | |
download | op-kernel-dev-1393b59f8c46001c8dbd47078881483cf97813c3.zip op-kernel-dev-1393b59f8c46001c8dbd47078881483cf97813c3.tar.gz |
drbd: Remove duplicate code
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index fed34a7..813759f 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -490,22 +490,9 @@ static int drbd_recv_short(struct socket *sock, void *buf, size_t size, int flag static int drbd_recv(struct drbd_tconn *tconn, void *buf, size_t size) { - mm_segment_t oldfs; - struct kvec iov = { - .iov_base = buf, - .iov_len = size, - }; - struct msghdr msg = { - .msg_iovlen = 1, - .msg_iov = (struct iovec *)&iov, - .msg_flags = MSG_WAITALL | MSG_NOSIGNAL - }; int rv; - oldfs = get_fs(); - set_fs(KERNEL_DS); - rv = sock_recvmsg(tconn->data.socket, &msg, size, msg.msg_flags); - set_fs(oldfs); + rv = drbd_recv_short(tconn->data.socket, buf, size, 0); if (rv < 0) { if (rv == -ECONNRESET) |