From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8A7FC636C9 for ; Thu, 15 Jul 2021 20:03:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 918426128C for ; Thu, 15 Jul 2021 20:03:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344273AbhGOUFx (ORCPT ); Thu, 15 Jul 2021 16:05:53 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:60554 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237605AbhGOUFq (ORCPT ); Thu, 15 Jul 2021 16:05:46 -0400 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m47ZD-000x9z-CX; Thu, 15 Jul 2021 20:02:43 +0000 Date: Thu, 15 Jul 2021 20:02:43 +0000 From: Al Viro To: Dmitry Kadashev Cc: Jens Axboe , Christian Brauner , Linus Torvalds , linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org Subject: Re: [PATCH 02/14] namei: clean up do_rmdir retry logic Message-ID: References: <20210715103600.3570667-1-dkadashev@gmail.com> <20210715103600.3570667-3-dkadashev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715103600.3570667-3-dkadashev@gmail.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Thu, Jul 15, 2021 at 05:35:48PM +0700, Dmitry Kadashev wrote: > No functional changes, just move the main logic to a helper function to > make the whole thing easier to follow. If you are renaming that pile of labels, at least give them names that would mean something... And TBH I would probably go for something like dentry = __lookup_hash(&last, path.dentry, lookup_flags); if (IS_ERR(dentry)) { error = PTR_ERR(dentry); goto out_unlock; } if (!dentry->d_inode) error = -ENOENT; if (!error) error = security_path_rmdir(&path, dentry); if (!error) error = vfs_rmdir(mnt_user_ns(path.mnt), path.dentry->d_inode, dentry); dput(dentry); out_unlock: there, to simplify that pile a bit...