From: Liu Ye <liuye@xxxxxxxxxx>
The function kpageflags_read and kpagecgroup_read is quite similar
to kpagecount_read. Consider refactoring common code into a helper
function to reduce code duplication.
Signed-off-by: Liu Ye <liuye@xxxxxxxxxx>
---
V4 : Update code remake patch.
V3 : Add a stub for page_cgroup_ino and remove the #ifdef CONFIG_MEMCG.
V2 : Use an enumeration to indicate the operation to be performed
to avoid passing functions.
---