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:Zizhi Wo <wozizhi@huawei.com>
Loading
Please sign in to comment