From cce4210a6ccde1cade539df4a4fe7a338845e1bc Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Mon, 2 Apr 2018 06:41:19 -0400 Subject: [PATCH] client: have init_gids just set alloced_gids to true We always call take_gids after init_gids, so just squash them together. Reported-by: Jos Collin Signed-off-by: Jeff Layton --- src/client/UserPerm.h | 2 +- src/client/fuse_ll.cc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/UserPerm.h b/src/client/UserPerm.h index a2d6ccbe888..d8a41957eb0 100644 --- a/src/client/UserPerm.h +++ b/src/client/UserPerm.h @@ -79,8 +79,8 @@ public: void init_gids(gid_t* _gids, int count) { gids = _gids; gid_count = count; + alloced_gids = true; } - void take_gids() { alloced_gids = true; } void shallow_copy(const UserPerm& o) { m_uid = o.m_uid; m_gid = o.m_gid; diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index 49f769cf029..115c26bcdaa 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -144,7 +144,6 @@ static void get_fuse_groups(UserPerm& perms, fuse_req_t req) if (count > 0) { perms.init_gids(gids, count); - perms.take_gids(); } else if (count < 0) { derr << __func__ << ": getgroups failed: " << cpp_strerror(-count) << dendl; -- 2.39.5