You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
kernel: ksud: remove remove read_iter requirement
nothing uses this on old kernels, so even backporting this to file_operations is not really needed https://elixir.bootlin.com/linux/v3.16.85/source/include/linux/fs.h#L1487 Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
This commit is contained in:
@@ -396,10 +396,12 @@ int ksu_handle_vfs_read(struct file **file_ptr, char __user **buf_ptr,
|
|||||||
if (orig_read) {
|
if (orig_read) {
|
||||||
fops_proxy.read = read_proxy;
|
fops_proxy.read = read_proxy;
|
||||||
}
|
}
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
|
||||||
orig_read_iter = file->f_op->read_iter;
|
orig_read_iter = file->f_op->read_iter;
|
||||||
if (orig_read_iter) {
|
if (orig_read_iter) {
|
||||||
fops_proxy.read_iter = read_iter_proxy;
|
fops_proxy.read_iter = read_iter_proxy;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// replace the file_operations
|
// replace the file_operations
|
||||||
file->f_op = &fops_proxy;
|
file->f_op = &fops_proxy;
|
||||||
read_count_append = rc_count;
|
read_count_append = rc_count;
|
||||||
|
|||||||
Reference in New Issue
Block a user