mwlwifi: downgrade to version 10.3.4.0-20180118
[openwrt/staging/kaloz.git] / package / kernel / mwlwifi / patches / 001-remove-vfs_write.patch
1 --- a/debugfs.c
2 +++ b/debugfs.c
3 @@ -87,7 +87,6 @@ static void core_dump_file(u8 *valbuf, u
4 u32 append, u32 totallen, bool textmode)
5 {
6 struct file *filp_core = NULL;
7 - mm_segment_t oldfs;
8 char file_name[40];
9 u8 *buf = kmalloc(length * 3, GFP_KERNEL);
10 u8 *data_p = buf;
11 @@ -100,9 +99,6 @@ static void core_dump_file(u8 *valbuf, u
12 sprintf(file_name, "/dev/shm/coredump-%x-%x",
13 region, (region + totallen));
14
15 - oldfs = get_fs();
16 - set_fs(KERNEL_DS);
17 -
18 if (append)
19 filp_core = filp_open(file_name, O_RDWR | O_APPEND, 0);
20 else
21 @@ -125,15 +121,15 @@ static void core_dump_file(u8 *valbuf, u
22 }
23 data_p = buf + j;
24 data_p += sprintf(data_p, "\n");
25 - vfs_write(filp_core, buf, strlen(buf),
26 - &filp_core->f_pos);
27 + kernel_write(filp_core, buf, strlen(buf),
28 + &filp_core->f_pos);
29 } else
30 - vfs_write(filp_core, valbuf, length, &filp_core->f_pos);
31 + kernel_write(filp_core, valbuf, length,
32 + &filp_core->f_pos);
33
34 filp_close(filp_core, current->files);
35 }
36
37 - set_fs(oldfs);
38 kfree(buf);
39 }
40