mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 03:19:35 +03:00
Linux 5.1 compat: get_ds() removed
Commit torvalds/linux@736706bee has removed the get_fs() function as a bit of cleanup. It has been defined as KERNEL_DS on all architectures for all supported kernels. Replace get_fs() with KERNEL_DS as was done in the kernel. Reviewed-by: Tom Caputi <tcaputi@datto.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #8479
This commit is contained in:
parent
becdcec7b9
commit
b46fd243d5
@ -83,7 +83,7 @@ spl_kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos)
|
|||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
|
|
||||||
saved_fs = get_fs();
|
saved_fs = get_fs();
|
||||||
set_fs(get_ds());
|
set_fs(KERNEL_DS);
|
||||||
|
|
||||||
ret = vfs_write(file, (__force const char __user *)buf, count, pos);
|
ret = vfs_write(file, (__force const char __user *)buf, count, pos);
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ spl_kernel_read(struct file *file, void *buf, size_t count, loff_t *pos)
|
|||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
|
|
||||||
saved_fs = get_fs();
|
saved_fs = get_fs();
|
||||||
set_fs(get_ds());
|
set_fs(KERNEL_DS);
|
||||||
|
|
||||||
ret = vfs_read(file, (void __user *)buf, count, pos);
|
ret = vfs_read(file, (void __user *)buf, count, pos);
|
||||||
|
|
||||||
@ -682,7 +682,7 @@ vn_set_pwd(const char *filename)
|
|||||||
* size to ensure strncpy_from_user() does not fail with -EFAULT.
|
* size to ensure strncpy_from_user() does not fail with -EFAULT.
|
||||||
*/
|
*/
|
||||||
saved_fs = get_fs();
|
saved_fs = get_fs();
|
||||||
set_fs(get_ds());
|
set_fs(KERNEL_DS);
|
||||||
|
|
||||||
rc = user_path_dir(filename, &path);
|
rc = user_path_dir(filename, &path);
|
||||||
if (rc)
|
if (rc)
|
||||||
|
Loading…
Reference in New Issue
Block a user