Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2541129pxf; Sat, 20 Mar 2021 21:17:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2nnWsEmPLR346WuO+DUyEexP1KkchL0VZt1WvCgiLcH4x+7d/N54++NYIGtb46ZfM15F3 X-Received: by 2002:a17:906:819:: with SMTP id e25mr12728204ejd.292.1616300266568; Sat, 20 Mar 2021 21:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616300266; cv=none; d=google.com; s=arc-20160816; b=Cvm5Cg9I/1y/O7A1+csg/emI8RInBAyOqmv0FxUrCbYxh22NlkNU50lZYmCh7F1/0U GL/6Qp+GV81ypH2fDFKzJFWJFkKMfAuz5/6oZrRfHIEeEEb2+YawBVij7ZXjhoeC+GuW GOZTg3Xb8V70ZaxFv7txRcZUaio05XkjEIGG/BnenaLJBm5yP5sCNWCOZ3lkokG2nksh OhUSjN2W9guF3WOYJYBzMWCLjowosyu6AgrMWfQ1/58i2XK+4IkYlqTU9dRTJd9w2AwN e9+oofZOJeOIFaoBV3jPiK3LlzcbJq+sEoV4FhYRXkRoncod6DTtceK0PZcXCCXb+mBE sEbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=C6lLwIaCJ05ZYK1hge5CshoGLzuUBQfkFFHQZoX4hjc=; b=vlb4pMPZX9kkqLW4faojxsoWxMTnG4a2xQoexy9Qw+l7HhKcKHxm07dCCO30BixESf Gt+5WTyaRlrcdmRjlYLC3BgCQ00I4YeDtZkCF08UtBc41lWmpCibwqozAUKkZicnhKmO TsMQah6Y2n9qqd803/pfmnl4t0GiqmBUFtAj15p898bm6DFZ8rRzDCSyTlR93XvFGh2O dnkTHvrCKqDeljWLSQI4zj3gAEI/VQoEF9jhhMw5wFxwX/PPd8my0+EGo1Lm0NDvAcMs w1hPBovNuoNXenQwLhlSgxusDTaxfpHmqNeSBmVaZVi3QY8rC/BbRr8FkhbspfM6fdWS aipQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-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 i25si7843562eje.58.2021.03.20.21.17.15; Sat, 20 Mar 2021 21:17:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229815AbhCUEKi (ORCPT + 99 others); Sun, 21 Mar 2021 00:10:38 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:36353 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229787AbhCUEKF (ORCPT ); Sun, 21 Mar 2021 00:10:05 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 12L49qIs026864 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 21 Mar 2021 00:09:52 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id D501315C39CA; Sun, 21 Mar 2021 00:09:51 -0400 (EDT) Date: Sun, 21 Mar 2021 00:09:51 -0400 From: "Theodore Ts'o" To: "zhangyi (F)" Cc: linux-ext4@vger.kernel.org, jack@suse.cz, yangerkun@huawei.com Subject: Re: [PATCH v1 2/2] ext4: Do not iput inode under running transaction in ext4_rename() Message-ID: References: <20210303131703.330415-1-yi.zhang@huawei.com> <20210303131703.330415-2-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210303131703.330415-2-yi.zhang@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Mar 03, 2021 at 09:17:03PM +0800, zhangyi (F) wrote: > In ext4_rename(), when RENAME_WHITEOUT failed to add new entry into > directory, it ends up dropping new created whiteout inode under the > running transaction. After commit <9b88f9fb0d2> ("ext4: Do not iput inode > under running transaction"), we follow the assumptions that evict() does > not get called from a transaction context but in ext4_rename() it breaks > this suggestion. Although it's not a real problem, better to obey it, so > this patch add inode to orphan list and stop transaction before final > iput(). > > Signed-off-by: zhangyi (F) Thanks, applied. - Ted