Skip to content

Commit 64a7617

Browse files
committed
perf namespaces: Fixup the nsinfo__in_pidns() return type, its bool
When adding support for refconunt checking a cut'n'paste made this function, that is just an accessor to a bool member of 'struct nsinfo', return a pid_t, when that member is a boolean, fix it. Fixes: bcaf0a9 ("perf namespaces: Add functions to access nsinfo") Reported-by: Francesco Nigro <[email protected]> Reported-by: Ilan Green <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Clark Williams <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Yonatan Goldschmidt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 74833e3 commit 64a7617

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/perf/util/namespaces.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ pid_t nsinfo__pid(const struct nsinfo *nsi)
266266
return RC_CHK_ACCESS(nsi)->pid;
267267
}
268268

269-
pid_t nsinfo__in_pidns(const struct nsinfo *nsi)
269+
bool nsinfo__in_pidns(const struct nsinfo *nsi)
270270
{
271271
return RC_CHK_ACCESS(nsi)->in_pidns;
272272
}

tools/perf/util/namespaces.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void nsinfo__clear_need_setns(struct nsinfo *nsi);
5858
pid_t nsinfo__tgid(const struct nsinfo *nsi);
5959
pid_t nsinfo__nstgid(const struct nsinfo *nsi);
6060
pid_t nsinfo__pid(const struct nsinfo *nsi);
61-
pid_t nsinfo__in_pidns(const struct nsinfo *nsi);
61+
bool nsinfo__in_pidns(const struct nsinfo *nsi);
6262
void nsinfo__set_in_pidns(struct nsinfo *nsi);
6363

6464
void nsinfo__mountns_enter(struct nsinfo *nsi, struct nscookie *nc);

0 commit comments

Comments
 (0)