linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org,
	syzbot+c27475eb921c46bbdc62@syzkaller.appspotmail.com,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 02/10] udf: Convert in-ICB files to use udf_writepages()
Date: Wed, 25 Jan 2023 10:28:48 +0100	[thread overview]
Message-ID: <20230125092848.dhb7iodmqokha5hv@quack3> (raw)
In-Reply-To: <Y8/cNRNSazn58MXL@infradead.org>

On Tue 24-01-23 05:25:09, Christoph Hellwig wrote:
> As a pure mechanical move this looks good:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks!

> But some comments:
> 
> > +	struct inode *inode = page->mapping->host;
> > +	char *kaddr;
> > +	struct udf_inode_info *iinfo = UDF_I(inode);
> > +
> > +	BUG_ON(!PageLocked(page));
> > +
> > +	kaddr = kmap_atomic(page);
> > +	memcpy(iinfo->i_data + iinfo->i_lenEAttr, kaddr, i_size_read(inode));
> > +	SetPageUptodate(page);
> > +	kunmap_atomic(kaddr);
> > +	unlock_page(page);
> 
> This really should be using memcpy_to_page.  And the SetPageUptodate
> here in ->writepages loos a little odd as well.

Good points. Added a cleanup patch for this. And then one more to get rid
of the last remaining kmap_atomic() use in UDF (BTW that would benefit from
memcpy_to_page_page() helper as well).

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

  reply	other threads:[~2023-01-25  9:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 12:06 [PATCH 0/10] udf: Unify aops Jan Kara
2023-01-24 12:06 ` [PATCH 01/10] udf: Unify .read_folio for normal and in-ICB files Jan Kara
2023-01-24 13:22   ` Christoph Hellwig
2023-01-24 12:06 ` [PATCH 02/10] udf: Convert in-ICB files to use udf_writepages() Jan Kara
2023-01-24 13:25   ` Christoph Hellwig
2023-01-25  9:28     ` Jan Kara [this message]
2023-01-24 12:06 ` [PATCH 03/10] udf: Convert in-ICB files to use udf_direct_IO() Jan Kara
2023-01-24 13:25   ` Christoph Hellwig
2023-01-24 12:06 ` [PATCH 04/10] udf: Convert in-ICB files to use udf_write_begin() Jan Kara
2023-01-24 13:26   ` Christoph Hellwig
2023-01-24 12:06 ` [PATCH 05/10] udf: Convert all file types to use udf_write_end() Jan Kara
2023-01-24 13:27   ` Christoph Hellwig
2023-01-24 12:06 ` [PATCH 06/10] udf: Add handling of in-ICB files to udf_bmap() Jan Kara
2023-01-24 13:27   ` Christoph Hellwig
2023-01-24 12:06 ` [PATCH 07/10] udf: Switch to single address_space_operations Jan Kara
2023-01-24 13:28   ` Christoph Hellwig
2023-01-24 12:06 ` [PATCH 08/10] udf: Mark aops implementation static Jan Kara
2023-01-24 13:28   ` Christoph Hellwig
2023-01-24 12:06 ` [PATCH 09/10] udf: Move udf_adinicb_readpage() to inode.c Jan Kara
2023-01-24 13:28   ` Christoph Hellwig
2023-01-24 12:06 ` [PATCH 10/10] udf: Switch udf_adinicb_readpage() to kmap_local_page() Jan Kara
2023-01-24 13:29   ` Christoph Hellwig

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=20230125092848.dhb7iodmqokha5hv@quack3 \
    --to=jack@suse.cz \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=syzbot+c27475eb921c46bbdc62@syzkaller.appspotmail.com \
    /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).