diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 22c9bda8d..33672d14d 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -10081,12 +10081,9 @@ static int __init vdev_check_mode_pages_path(void) #else struct path path; #endif - mm_segment_t old_fs = get_fs(); TRACE_ENTRY(); - set_fs(KERNEL_DS); - #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) res = path_lookup(VDEV_MODE_PAGES_DIR, 0, &nd); if (res == 0) @@ -10101,12 +10098,8 @@ static int __init vdev_check_mode_pages_path(void) "disabled. You should create this directory manually " "or reinstall SCST", VDEV_MODE_PAGES_DIR, res); vdev_saved_mode_pages_enabled = false; - goto out_setfs; } -out_setfs: - set_fs(old_fs); - res = 0; /* always succeed */ TRACE_EXIT_RES(res); diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 2f969b669..7471e2edb 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -15235,12 +15235,9 @@ int scst_remove_file(const char *name) #else struct path path; #endif - mm_segment_t old_fs = get_fs(); TRACE_ENTRY(); - set_fs(KERNEL_DS); - #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) res = path_lookup(name, 0, &nd); if (!res) @@ -15255,8 +15252,6 @@ int scst_remove_file(const char *name) TRACE_DBG("Unable to lookup file '%s' - error %d", name, res); #endif - set_fs(old_fs); - TRACE_EXIT_RES(res); return res; }