get rid of legacy 'get_ds()' function
Every in-kernel use of this function defined it to KERNEL_DS
(either as an actual define, or as an inline function).
Linux-commit:
736706bee3298208343a76096370e4f6a5c55915
Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I3aabe74802f1a953b140728f22c83125dae270c3
Reviewed-on: https://review.whamcloud.com/35238
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
mm_segment_t __old_fs = get_fs();
int rc;
- set_fs(get_ds());
+ set_fs(KERNEL_DS);
rc = vfs_write(filp, (__force const char __user *)buf, count, pos);
set_fs(__old_fs);
OBD_SET_CTXT_MAGIC(newctxt);
newctxt->pwdmnt = dev->od_mnt;
newctxt->pwd = dev->od_mnt->mnt_root;
- newctxt->fs = get_ds();
+ newctxt->fs = KERNEL_DS;
newctxt->umask = current_umask();
newctxt->dt = NULL;
fei.fi_extents_start = &fe;
saved_fs = get_fs();
- set_fs(get_ds());
+ set_fs(KERNEL_DS);
rc = inode->i_op->fiemap(inode, &fei, offset, FIEMAP_MAX_OFFSET-offset);
set_fs(saved_fs);
if (rc != 0)
/* Save previous value address limit */
cur_fs = get_fs();
/* Set the address limit of the kernel */
- set_fs(get_ds());
+ set_fs(KERNEL_DS);
rc = inode->i_op->fiemap(inode, &fieinfo, fm->fm_start, len);
fm->fm_flags = fieinfo.fi_flags;
OBD_SET_CTXT_MAGIC(ctxt);
ctxt->pwdmnt = dev->od_mnt;
ctxt->pwd = dev->od_mnt->mnt_root;
- ctxt->fs = get_ds();
+ ctxt->fs = KERNEL_DS;
init_waitqueue_head(&scrub->os_thread.t_ctl_waitq);
init_rwsem(&scrub->os_rwsem);
/* Debugging check only needed during development */
#ifdef OBD_CTXT_DEBUG
# define ASSERT_CTXT_MAGIC(magic) LASSERT((magic) == OBD_RUN_CTXT_MAGIC)
-# define ASSERT_NOT_KERNEL_CTXT(msg) LASSERTF(!segment_eq(get_fs(), get_ds()),\
+# define ASSERT_NOT_KERNEL_CTXT(msg) LASSERTF(!segment_eq(get_fs(), KERNEL_DS),\
msg)
-# define ASSERT_KERNEL_CTXT(msg) LASSERTF(segment_eq(get_fs(), get_ds()), msg)
+# define ASSERT_KERNEL_CTXT(msg) LASSERTF(segment_eq(get_fs(), KERNEL_DS), msg)
#else
# define ASSERT_CTXT_MAGIC(magic) do {} while(0)
# define ASSERT_NOT_KERNEL_CTXT(msg) do {} while(0)