Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2737748pxa; Mon, 17 Aug 2020 18:19:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDQSd3E/HSn+VATnZe+LFsLiDg6KAAXuf7Y39qyDA+yU/Rblac/pu+eK6PNHbSP6BsDEYn X-Received: by 2002:a17:906:a284:: with SMTP id i4mr18543670ejz.490.1597713555551; Mon, 17 Aug 2020 18:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597713555; cv=none; d=google.com; s=arc-20160816; b=SO9mOSkJuPe1HKuWUVPwPpM96ehegAzxQpociniM+wi2KUbZZKvDxWuGAA6leWi6Wr k0Qq8l2zgxrztOLQApc1bhxVY/TLpIkg6h/EUjVgSatmuDBh+Rglx6yK/FgtNNpwlgRF /WeaewslcOynbMIM4i5xD7DYAUB+8VxH02RFu/uIorRfTUvlB/+rc+Zfz4XIREVqONRD +oJKbUXlcP1HrvWrrVhR7aIeXF+nBT5YvOtSppulvv82nWcogYrVPMw/zLA7MsCHtnPc 8dzS9gnFLoq7GarMMyFSsUxG0nJtde7jFFEiHFq7PllkR1SquJXplhq19VXMPVKTLb6Z Z2Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=jO6k+zx2QyYG7TMnQ5c6/6yeQvSBLn9YZjhaXafaPvk=; b=Opm7e6pHKR6Cl4/E6hjuT8riSFvJNx+AzCxXNvPHW3ztYNIBi1sYV04noTr31vMJnp a6JCaeWyP0FQYHHLkQtMKqpjhRA8eFLas3DGB9/vqEnfbOenThbQ22MKFkRgwWBtcAIx zBZNnPR8B6B62bh3Zf2WXUX+ksOGVP+m8eFYFAc8qZ5xphOA+6+Gm2nR/gk6qRSc2YZZ uV/TR4hnmQx2Xn38KtbfijPj08gojor0OZ3b9kcJhlxWlhwK3seQDi+DMfMacr2DrZxX AUNEp46sVMV9/6sItGsMz60iLq2qZFHtmdK8mDhfW1ldY+ioP3GKUL4ncAs7imoobZr9 b7EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=eHsDhhag; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a90si11497799edf.486.2020.08.17.18.18.50; Mon, 17 Aug 2020 18:19:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=eHsDhhag; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726357AbgHRBR6 (ORCPT + 99 others); Mon, 17 Aug 2020 21:17:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726287AbgHRBR6 (ORCPT ); Mon, 17 Aug 2020 21:17:58 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1E6EC061342 for ; Mon, 17 Aug 2020 18:17:57 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id w25so19524233ljo.12 for ; Mon, 17 Aug 2020 18:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jO6k+zx2QyYG7TMnQ5c6/6yeQvSBLn9YZjhaXafaPvk=; b=eHsDhhag9rrcZCLW4PVvHzOSXn+lP4FTzkwXO8QbMaXFsoRdcItDm4EaUIv9k9Eayj DrMKFoyqJ82ML0/jpilgEzHE0oovbm1sqBsCjmoGO2+tOR9O7zFUyZoSgpXghA0LrnSJ pzyGN+EBFFdYxkC7yV+8bD6gAtHXA0066kioo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jO6k+zx2QyYG7TMnQ5c6/6yeQvSBLn9YZjhaXafaPvk=; b=TgUoGEpz0ggoB+pOmt1nEM6p7ocyO6ks2n1pmZnm+Swrf6+r5UI7LixOGXaShZVnTB fAXnHKvjS9Zs9D3RqwCkVbJDx6Jdu2wGnQZc9GvQ+8GNyHOwkAKHmZIJK1Q2EDkfodSa jsJ7Yacr+wMBC2ujudZvxRhpt2gWW4GyN3VhCc0RfrmpJCrSzHnjuUeKgtnaUjFSEhoc 06HwyYWzyPpavkdtddOFDKWX/suE3phnvWr/Atd0GvFB6rKRPuH5GNIKdWxhoKiUZvsk QBWo5/NZ1t9NT6It2E/7MF/6PvKIgyVYs9n1fJZU+puZrLWS+bg2pZ49zrhMViPBxZPs /srA== X-Gm-Message-State: AOAM531MNY+QsWCPhsmsYhEObRyvsayKnOZR7GoUcLpCF1GasN/2O9h9 gG5HDiwsbY095vl+ft1nf93Hc/OvwQuzuw== X-Received: by 2002:a2e:9852:: with SMTP id e18mr8552630ljj.415.1597713475244; Mon, 17 Aug 2020 18:17:55 -0700 (PDT) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com. [209.85.208.179]) by smtp.gmail.com with ESMTPSA id u5sm5902411lfi.91.2020.08.17.18.17.52 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Aug 2020 18:17:53 -0700 (PDT) Received: by mail-lj1-f179.google.com with SMTP id v9so19573198ljk.6 for ; Mon, 17 Aug 2020 18:17:52 -0700 (PDT) X-Received: by 2002:a05:651c:503:: with SMTP id o3mr9127085ljp.312.1597713472024; Mon, 17 Aug 2020 18:17:52 -0700 (PDT) MIME-Version: 1.0 References: <87ft8l6ic3.fsf@x220.int.ebiederm.org> <20200817220425.9389-9-ebiederm@xmission.com> <875z9g7oln.fsf@x220.int.ebiederm.org> In-Reply-To: <875z9g7oln.fsf@x220.int.ebiederm.org> From: Linus Torvalds Date: Mon, 17 Aug 2020 18:17:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 09/17] file: Implement fnext_task To: "Eric W. Biederman" Cc: Linux Kernel Mailing List , "" , criu@openvz.org, bpf , Alexander Viro , Christian Brauner , Oleg Nesterov , Cyrill Gorcunov , Jann Horn , Kees Cook , =?UTF-8?Q?Daniel_P=2E_Berrang=C3=A9?= , Jeff Layton , Miklos Szeredi , Matthew Wilcox , "J. Bruce Fields" , Matthew Wilcox , Trond Myklebust , Chris Wright , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 17, 2020 at 6:06 PM Eric W. Biederman wrote: > > I struggle with the fcheck name as I have not seen or at least not > registed on the the user that just checks to see if the result is NULL. > So the name fcheck never made a bit of sense to me. Yeah, that name is not great. I just don't want to make things even worse. > I will see if I can come up with some good descriptive comments around > these functions. Along with describing what these things are doing I am > thinking maybe I should put "_rcu" in their names and have a debug check > that verifies "_rcu" is held. Yeah, something along the lines of "rcu_lookup_fd_task(tsk,fd)" would be a *lot* more descriptive than fcheck_task(). And I think "fnext_task()" could be "rcu_lookup_next_fd_task(tsk,fd)". Yes, those are much longer names, but it's not like you end up typing them all that often, and I think being descriptive would be worth it. And "fcheck()" and "fcheck_files()" would be good to rename too along the same lines. Something like "rcu_lookup_fd()" and "rcu_lookup_fd_files()" respectively? I'm obviously trying to go for a "rcu_lookup_fd*()" kind of pattern, and I'm not married to _that_ particular pattern but I think it would be better than what we have now. Linus