lkml.org 
[lkml]   [2021]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] fs/ext2: Avoid page_address on pages returned by ext2_get_page
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

\
 
 \ /
  Last update: 2021-07-14 11:00    [W:0.209 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site