mm/lib: use different read/write function for cpuset

cpuset files may have different filenames like:

    /dev/cpuset/cpus
    /dev/cpuset/cpuset.cpus

Which causes read from and write to cpuset files more difficult. I have
to add two new functions to avoid more duplicated codes. And
write_cpuset_mems and write_cpuset_cpus can be replaced by the new
functions.

Signed-off-by: Caspar Zhang <caspar@casparzhang.com>
3 files changed