Commit 10428957 authored by Al Viro's avatar Al Viro

drbd: ->sendpage() never needed set_fs()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 2ea659a9
...@@ -1550,7 +1550,6 @@ static int _drbd_send_page(struct drbd_peer_device *peer_device, struct page *pa ...@@ -1550,7 +1550,6 @@ static int _drbd_send_page(struct drbd_peer_device *peer_device, struct page *pa
int offset, size_t size, unsigned msg_flags) int offset, size_t size, unsigned msg_flags)
{ {
struct socket *socket = peer_device->connection->data.socket; struct socket *socket = peer_device->connection->data.socket;
mm_segment_t oldfs = get_fs();
int len = size; int len = size;
int err = -EIO; int err = -EIO;
...@@ -1565,7 +1564,6 @@ static int _drbd_send_page(struct drbd_peer_device *peer_device, struct page *pa ...@@ -1565,7 +1564,6 @@ static int _drbd_send_page(struct drbd_peer_device *peer_device, struct page *pa
msg_flags |= MSG_NOSIGNAL; msg_flags |= MSG_NOSIGNAL;
drbd_update_congested(peer_device->connection); drbd_update_congested(peer_device->connection);
set_fs(KERNEL_DS);
do { do {
int sent; int sent;
...@@ -1585,7 +1583,6 @@ static int _drbd_send_page(struct drbd_peer_device *peer_device, struct page *pa ...@@ -1585,7 +1583,6 @@ static int _drbd_send_page(struct drbd_peer_device *peer_device, struct page *pa
len -= sent; len -= sent;
offset += sent; offset += sent;
} while (len > 0 /* THINK && device->cstate >= C_CONNECTED*/); } while (len > 0 /* THINK && device->cstate >= C_CONNECTED*/);
set_fs(oldfs);
clear_bit(NET_CONGESTED, &peer_device->connection->flags); clear_bit(NET_CONGESTED, &peer_device->connection->flags);
if (len == 0) { if (len == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment