Skip to content

Commit

Permalink
fix: compatibility with 5.1 kernel
Browse files Browse the repository at this point in the history
get_ds was defined as KERNEL_DS since 2.6. It was removed in 5.1.

torvalds/linux@736706b
  • Loading branch information
felixonmars authored and zccrs committed May 8, 2019
1 parent 26ffc7c commit 180484e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernelmod/vfs_utils.c
Expand Up @@ -24,7 +24,7 @@ char* __init read_file_content(const char* filename, int *real_size)
return 0;
}
mm_segment_t old_fs = get_fs();
set_fs(get_ds());
set_fs(KERNEL_DS);

// i_size_read is useless here because procfs does not have i_size
// loff_t size = i_size_read(file_inode(filp));
Expand Down

0 comments on commit 180484e

Please sign in to comment.