ret = -ENOENT;
goto out;
}
- /* We should only deny getting the attributes of a file if it
- * neither contains O_RDONLY permission nor O_WRONLY
- * permissions. Otherwise we ls -al will not show attributes on
- * O_WRONLY files. Such files are quite common under /proc or
- * /sys. */
- if (!fc_may_access(fc, controller, path1, path2, O_RDONLY) &&
- !fc_may_access(fc, controller, path1, path2, O_WRONLY)) {
- ret = -EACCES;
- goto out;
- }
-
ret = 0;
}
} else if (startswith(line, "SwapCached:")) {
snprintf(lbuf, 100, "SwapCached: %8lu kB\n", 0UL);
printme = lbuf;
- } else if (startswith(line, "Active")) {
+ } else if (startswith(line, "Active:")) {
snprintf(lbuf, 100, "Active: %8lu kB\n",
active_anon + active_file);
printme = lbuf;
- } else if (startswith(line, "Inactive")) {
+ } else if (startswith(line, "Inactive:")) {
snprintf(lbuf, 100, "Inactive: %8lu kB\n",
inactive_anon + inactive_file);
printme = lbuf;