linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Javier Pello <javier.pello@urjc.es>
Cc: Jan Kara <jack@suse.cz>, Jan Kara <jack@suse.com>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ira Weiny <ira.weiny@intel.com>
Subject: Re: [PATCH 1/1] fs/ext2: Avoid page_address on pages returned by ext2_get_page
Date: Wed, 14 Jul 2021 11:00:13 +0200	[thread overview]
Message-ID: <20210714090013.GA9457@quack2.suse.cz> (raw)
In-Reply-To: <20210713193319.a223cd12e3fb8687f0cae0e8@urjc.es>

On Tue 13-07-21 19:33:19, Javier Pello wrote:
> On Tue, 13 Jul 2021 18:30:18, Jan Kara wrote:
> > > @@ -584,16 +584,16 @@ int ext2_add_link (struct dentry *dentry, struct inode *inode)
> > >   * ext2_delete_entry deletes a directory entry by merging it with the
> > >   * previous entry. Page is up-to-date.
> > >   */
> > > -int ext2_delete_entry (struct ext2_dir_entry_2 * dir, struct page * page )
> > > +int ext2_delete_entry (struct ext2_dir_entry_2 *dir, struct page *page,
> > > +                     void *kaddr)
> > 
> > Why not have 'kaddr' as char *. We type it to char * basically everywhere
> > anyway.
> 
> I thought about that, as well, but in the end I leaned towards void *
> because it is a generic pointer, conceptually. Would you rather have it
> be char *?

Well, it depends on how you look at it. We can also think of kaddr as a
start of buffer 'dir' is pointing to. Anyway given this is not some generic
function but a very targetted one with only a few call sites I'd just lean
towards making our life easy and making kaddr char *.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2021-07-14  9:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13 14:58 [PATCH 0/1] Kernel oopses on ext2 filesystems after 782b76d7abdf Javier Pello
2021-07-13 14:59 ` [PATCH 1/1] fs/ext2: Avoid page_address on pages returned by ext2_get_page Javier Pello
2021-07-13 16:30   ` Jan Kara
2021-07-13 17:33     ` Javier Pello
2021-07-14  9:00       ` Jan Kara [this message]
2021-07-14 16:54         ` [PATCH v2] " Javier Pello
2021-07-14 17:07           ` Ira Weiny
2021-07-15 12:17             ` Jan Kara
2021-07-15 16:18               ` Javier Pello
2021-07-13 18:17     ` [PATCH 1/1] " Ira Weiny

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=20210714090013.GA9457@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=ira.weiny@intel.com \
    --cc=jack@suse.com \
    --cc=javier.pello@urjc.es \
    --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).