mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
Use KERNEL_DS instead of get_ds() (merge r8057 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@8059 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user