Rename `parent' to `member'. We currently set `parent' to true during iteration over namespaces if `cred' resides in one of parent namespaces of `user_ns'. But if `cred' is a member of `user_ns' itself, `parent' name is not the best choice. Also new `member' name is more consistent with the `owner' var, as it can be read "cred is a member of user_ns or one of its parents" and "cred is the owner of ...".
Signed-off-by: Sergei Zviagintsev <[email protected]> --- ipc/kdbus/metadata.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ipc/kdbus/metadata.c b/ipc/kdbus/metadata.c index 4ff4b99a40e0..788b4d9c7ecb 100644 --- a/ipc/kdbus/metadata.c +++ b/ipc/kdbus/metadata.c @@ -725,7 +725,7 @@ static void kdbus_meta_export_caps(struct kdbus_meta_caps *out, { struct user_namespace *iter; const struct cred *cred = mp->cred; - bool parent = false, owner = false; + bool member = false, owner = false; int i; /* @@ -748,7 +748,7 @@ static void kdbus_meta_export_caps(struct kdbus_meta_caps *out, */ for (iter = user_ns; iter; iter = iter->parent) { if (iter == cred->user_ns) { - parent = true; + member = true; break; } @@ -765,7 +765,7 @@ static void kdbus_meta_export_caps(struct kdbus_meta_caps *out, out->last_cap = CAP_LAST_CAP; CAP_FOR_EACH_U32(i) { - if (parent) { + if (member) { out->set[0].caps[i] = cred->cap_inheritable.cap[i]; out->set[1].caps[i] = cred->cap_permitted.cap[i]; out->set[2].caps[i] = cred->cap_effective.cap[i]; -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

