Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e0e1b44 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "lmkd: Skip memory.stat usage when per-app memcgs are not used"

parents 41950dd4 1d1c002c
Loading
Loading
Loading
Loading
+20 −13
Original line number Diff line number Diff line
@@ -758,6 +758,13 @@ static int memory_stat_parse(struct memory_stat *mem_st, int pid, uid_t uid) {
    FILE *fp;
    char buf[PATH_MAX];

    /*
     * Per-application memory.stat files are available only when
     * per-application memcgs are enabled.
     */
    if (!per_app_memcg)
        return -1;

    snprintf(buf, sizeof(buf), MEMCG_PROCESS_MEMORY_STAT_PATH, uid, pid);

    fp = fopen(buf, "r");