kernel: remove ksu_compat_{open,read,write} because we're in the right context now

Co-authored-by: weishu <twsxtd@gmail.com>
This commit is contained in:
weishu
2025-11-08 08:31:02 +00:00
committed by ShirkNeko
parent 4fc369a059
commit e171ca15cb
9 changed files with 103 additions and 204 deletions

View File

@@ -130,7 +130,7 @@ static void sulog_work_handler(struct work_struct *work)
if (list_empty(&local_queue))
return;
fp = ksu_filp_open_compat(SULOG_PATH, O_WRONLY | O_CREAT | O_APPEND, 0640);
fp = filp_open(SULOG_PATH, O_WRONLY | O_CREAT | O_APPEND, 0640);
if (IS_ERR(fp)) {
pr_err("sulog: failed to open log file: %ld\n", PTR_ERR(fp));
goto cleanup;
@@ -147,7 +147,7 @@ static void sulog_work_handler(struct work_struct *work)
}
list_for_each_entry(entry, &local_queue, list) {
ksu_kernel_write_compat(fp, entry->content, strlen(entry->content), &pos);
kernel_write(fp, entry->content, strlen(entry->content), &pos);
}
vfs_fsync(fp, 0);