Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp471340pxf; Thu, 25 Mar 2021 07:56:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyC8RlV5adDGWvD0/DE3cD3dvKxBa9JYXHVwd+D6JjEsrhBE40caCQLNhtHacOVZQkIiQhX X-Received: by 2002:a17:907:216d:: with SMTP id rl13mr9681298ejb.362.1616684203074; Thu, 25 Mar 2021 07:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616684203; cv=none; d=google.com; s=arc-20160816; b=JH3BXJqEM0/MQvbwgcvHswAA3S3rN9sFh7qY1jGgtIL7kZFBHE1lpoMIHOeYbGuIF9 D/Vv4Pp6J0Vgs49i32LscF8EhNS9CPIL10N/HZwlClX9rLPVcN4YDEFjkOq39VT27vbh ia0Y5kmYShDfCltolGIFjOvJ4W0r9tmAw7qwD9Bud7mKGXpCNiN/UxQqX452PGq5bVAn FKsty9Qg9jy/duqUbTe23cEVL0Dv1re/h5XaoHmTQL0+MHxeeYOGDvAHqPm1y1yNw3Ta abxLRvEZ4Zog/2d7KSbYDbQhEQK3/zm9WiMGwi4b5DgkuKyMSDhegZkAY8hY9O/rjTSW mtRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=9TuIflluuWQ1Tu3wpi0/xukgW2r10hLOOe8z3PyGYy4=; b=Jyq2fy33b8Mal0FM1oz5cX57nWnZbQKlh1RqHc5eD5ejf0s2MLWpO971ecPtZ41sJz 6yQcdBZ2X8lJNZOmV8PDqMdsTeRVCbBNvCv05q/JM+z1vMEMOnPd/JGgNI5ci/QzJ5Iz GxnH89XM45Xf7yIsy3Yn473u3fpfA+bQu9fvNfDnjCfbd7ONQDc0fmKZ6T7B67hJ57Sc +nkIT43KuiuKtQRZv5tBDPY1hg3vFA2P5P21M7an3drVf6zOTC8pWHovJB+zxOM1ptiV JqIw7mtS81znlfBje5Jdl/neGMtQjoSCq39LaAdsx5eEeNhssQ1YWyjDea3kxUMx97TY rHdw== 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 sd1si4314275ejb.660.2021.03.25.07.56.02; Thu, 25 Mar 2021 07:56:43 -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 S230433AbhCYOzW (ORCPT + 99 others); Thu, 25 Mar 2021 10:55:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:57818 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231384AbhCYOy7 (ORCPT ); Thu, 25 Mar 2021 10:54:59 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3E495AA55; Thu, 25 Mar 2021 14:54:58 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 02C6E1E4415; Thu, 25 Mar 2021 15:54:57 +0100 (CET) Date: Thu, 25 Mar 2021 15:54:57 +0100 From: Jan Kara To: Ira Weiny Cc: Jan Kara , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: ext2_set_link()->ext2_put_page() question Message-ID: <20210325145457.GE13673@quack2.suse.cz> References: <20210323004948.GR3014244@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210323004948.GR3014244@iweiny-DESK2.sc.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon 22-03-21 17:49:48, Ira Weiny wrote: > Jan, > > Why does ext2_set_link() need to call ext2_put_page()? > > I don't see any reason that we could not match up the ext2_put_page() calls > with the ext2_find_entry(). > > Similarly am I missing something by moving the ext2_put_page() out of > ext2_delete_entry()? > > See below patch. I agree that your patch improves readability. But please fixup comments about releasing a page as well. Thanks! > I'm in the process of changing the kmap() calls in ext2_[get|put]_page() into > kmap_local_page() and I noticed this imbalance. It does not really save me > anything because I need to pass the kaddr into these calls but IMO it makes the > code a bit easier to follow. > > If you agree I will get a patch together to submit with the kmap_local_page() > patch. OK :). Honza -- Jan Kara SUSE Labs, CR