diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index 82845890f..f7095cb80 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -854,7 +854,7 @@ static int conn_setup_sock(struct iscsi_conn *conn) conn->sock->sk->sk_user_data = conn; oldfs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); conn->sock->ops->setsockopt(conn->sock, SOL_TCP, TCP_NODELAY, (void __force __user *)&opt, sizeof(opt)); set_fs(oldfs); diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index ffd7bdb65..b0238b92f 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -2933,7 +2933,7 @@ static inline void set_cork(struct socket *sock, int on) mm_segment_t oldfs; oldfs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); sock->ops->setsockopt(sock, SOL_TCP, TCP_CORK, (void __force __user *)&opt, sizeof(opt)); set_fs(oldfs); diff --git a/iscsi-scst/kernel/nthread.c b/iscsi-scst/kernel/nthread.c index 90b4a3c62..6872744d4 100644 --- a/iscsi-scst/kernel/nthread.c +++ b/iscsi-scst/kernel/nthread.c @@ -728,7 +728,7 @@ restart: #endif oldfs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); res = sock_recvmsg(conn->sock, msg, #if SOCK_RECVMSG_HAS_FOUR_ARGS read_size, diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 23a09e97e..754bb220c 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -2133,7 +2133,7 @@ static int vdisk_format_dif(struct scst_cmd *cmd, uint64_t start_lba, iv[i].iov_base = (uint8_t __force __user *)data_buf; old_fs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); loff = start_lba << SCST_DIF_TAG_SHIFT; left = blocks << SCST_DIF_TAG_SHIFT; @@ -5671,7 +5671,7 @@ static int vdev_read_dif_tags(struct vdisk_cmd_params *p) max_iv_count = p->sync.iv_count; old_fs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); tags_sg = NULL; loff = (p->loff >> cmd->dev->block_shift) << SCST_DIF_TAG_SHIFT; @@ -5792,7 +5792,7 @@ static int vdev_write_dif_tags(struct vdisk_cmd_params *p) max_iv_count = p->sync.iv_count; old_fs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); tags_sg = NULL; loff = (p->loff >> cmd->dev->block_shift) << SCST_DIF_TAG_SHIFT; @@ -5936,7 +5936,7 @@ static enum compl_status_e fileio_exec_read(struct vdisk_cmd_params *p) } old_fs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); while (1) { iv_count = 0; @@ -6126,7 +6126,7 @@ static enum compl_status_e fileio_exec_write(struct vdisk_cmd_params *p) } old_fs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); while (1) { iv_count = 0; @@ -7056,7 +7056,7 @@ static ssize_t fileio_read_sync(struct file *fd, void *buf, size_t len, ssize_t ret; old_fs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); ret = scst_read(fd, buf, len, loff); set_fs(old_fs); diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index cfa50bd46..69e442e12 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5846,7 +5846,7 @@ static void scst_complete_request_sense(struct scst_cmd *req_cmd) static int scst_cmp_fs_ds(void) { mm_segment_t fs = get_fs(); - mm_segment_t ds = get_ds(); + mm_segment_t ds = KERNEL_DS; return memcmp(&fs, &ds, sizeof(fs)); }