drbd: ->sendpage() never needed set_fs()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 27 May 2017 04:32:51 +0000 (00:32 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 27 May 2017 19:50:24 +0000 (15:50 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/block/drbd/drbd_main.c

index 84455c365f578892e5ba2f7d0da714b974959ce6..da4944ea974eb7197a403e7f34824715181d2d22 100644 (file)
@@ -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)
 {
        struct socket *socket = peer_device->connection->data.socket;
-       mm_segment_t oldfs = get_fs();
        int len = size;
        int err = -EIO;
 
@@ -1565,7 +1564,6 @@ static int _drbd_send_page(struct drbd_peer_device *peer_device, struct page *pa
 
        msg_flags |= MSG_NOSIGNAL;
        drbd_update_congested(peer_device->connection);
-       set_fs(KERNEL_DS);
        do {
                int sent;
 
@@ -1585,7 +1583,6 @@ static int _drbd_send_page(struct drbd_peer_device *peer_device, struct page *pa
                len    -= sent;
                offset += sent;
        } while (len > 0 /* THINK && device->cstate >= C_CONNECTED*/);
-       set_fs(oldfs);
        clear_bit(NET_CONGESTED, &peer_device->connection->flags);
 
        if (len == 0) {