3 @@ -279,7 +279,6 @@ static void core_dump_file(u8 *valbuf, u
4 u32 append, u32 totallen, bool textmode)
6 struct file *filp_core = NULL;
9 u8 *buf = kmalloc(length * 3, GFP_KERNEL);
11 @@ -292,9 +291,6 @@ static void core_dump_file(u8 *valbuf, u
12 sprintf(file_name, "/dev/shm/coredump-%x-%x",
13 region, (region + totallen));
19 filp_core = filp_open(file_name, O_RDWR | O_APPEND, 0);
21 @@ -317,15 +313,15 @@ static void core_dump_file(u8 *valbuf, u
24 data_p += sprintf(data_p, "\n");
25 - vfs_write(filp_core, buf, strlen(buf),
27 + kernel_write(filp_core, buf, strlen(buf),
30 - vfs_write(filp_core, valbuf, length, &filp_core->f_pos);
31 + kernel_write(filp_core, valbuf, length,
34 filp_close(filp_core, current->files);
41 @@ -1339,7 +1335,6 @@ static ssize_t mwl_debugfs_ba_hist_read(
42 u8 bmap0flag, nobaflag;
43 char buff[500], file_location[20];
44 struct file *filp_bahisto;
49 @@ -1355,13 +1350,10 @@ static ssize_t mwl_debugfs_ba_hist_read(
50 memset(file_location, 0, sizeof(file_location));
51 sprintf(file_location, "/tmp/ba_histo-%d", priv->ba_aid);
55 filp_bahisto = filp_open(file_location,
56 O_RDWR | O_CREAT | O_TRUNC, 0);
58 if (IS_ERR(filp_bahisto)) {
63 @@ -1402,8 +1394,8 @@ static ssize_t mwl_debugfs_ba_hist_read(
65 /* Buffer is full. Write to file and reset buf */
66 if ((strlen(buff) + 36) >= 500) {
67 - vfs_write(filp_bahisto, buff, strlen(buff),
68 - &filp_bahisto->f_pos);
69 + kernel_write(filp_bahisto, buff, strlen(buff),
70 + &filp_bahisto->f_pos);
72 memset(buff, 0, sizeof(buff));
74 @@ -1427,8 +1419,8 @@ static ssize_t mwl_debugfs_ba_hist_read(
75 data_p += sprintf(data_p, "%8d\n", nobaflag);
78 - vfs_write(filp_bahisto, buff, strlen(buff),
79 - &filp_bahisto->f_pos);
80 + kernel_write(filp_bahisto, buff, strlen(buff),
81 + &filp_bahisto->f_pos);
82 len += scnprintf(p + len, size - len,
83 "hole: %d, expect: %d, bmap0: %d, noba: %d\n",
84 baholecnt, baexpcnt, bmap0cnt, nobacnt);
85 @@ -1441,7 +1433,6 @@ static ssize_t mwl_debugfs_ba_hist_read(
88 filp_close(filp_bahisto, current->files);
91 ret = simple_read_from_buffer(ubuf, count, ppos, p, len);