Commit 5a1ee702 authored by Zizhi Wo's avatar Zizhi Wo
Browse files

fs/dirty_pages: fix some errors in seq_read_dirty()

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8JUUC?from=project-issue



--------------------------------

In seq_read_dirty(), the parameter passed into simple_read_from_buffer()
will cause problem on a 32-bit system; The simple_read_from_buffer()
function has a lot of redundancy checks inside. Replaced it with
copy_to_user() and add the return value check. And the update of the
"copied" character count in seq_read_dirty() is also incorrect, fixed it.

Fixes: aeb96447 ("fs/dirty_pages: dump the number of dirty pages for each inode")
Signed-off-by: default avatarZizhi Wo <wozizhi@huawei.com>
parent 66bcd863
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment