From: Jeff Layton Date: Mon, 2 Apr 2018 10:41:19 +0000 (-0400) Subject: client: have init_gids just set alloced_gids to true X-Git-Tag: v13.1.0~356^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cce4210a6ccde1cade539df4a4fe7a338845e1bc;p=ceph.git 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 --- diff --git a/src/client/UserPerm.h b/src/client/UserPerm.h index a2d6ccbe888d..d8a41957eb0d 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 49f769cf029d..115c26bcdaad 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;