From: Jan Kara <jack@suse.cz>
To: Ira Weiny <ira.weiny@intel.com>
Cc: Jan Kara <jack@suse.com>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: ext2_set_link()->ext2_put_page() question
Date: Thu, 25 Mar 2021 15:54:57 +0100 [thread overview]
Message-ID: <20210325145457.GE13673@quack2.suse.cz> (raw)
In-Reply-To: <20210323004948.GR3014244@iweiny-DESK2.sc.intel.com>
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 <jack@suse.com>
SUSE Labs, CR
prev parent reply other threads:[~2021-03-25 14:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-23 0:49 ext2_set_link()->ext2_put_page() question Ira Weiny
2021-03-25 14:54 ` Jan Kara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210325145457.GE13673@quack2.suse.cz \
--to=jack@suse.cz \
--cc=ira.weiny@intel.com \
--cc=jack@suse.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).