diff mbox series

[v9,3/8] iomap: Don't get an reference on ZERO_PAGE for direct I/O block zeroing

Message ID 20230124170108.1070389-4-dhowells@redhat.com (mailing list archive)
State New, archived
Headers show
Series iov_iter: Improve page extraction (pin or just list) | expand

Commit Message

David Howells Jan. 24, 2023, 5:01 p.m. UTC
ZERO_PAGE can't go away, no need to hold an extra reference.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
---
 fs/iomap/direct-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig Jan. 24, 2023, 7:01 p.m. UTC | #1
On Tue, Jan 24, 2023 at 05:01:03PM +0000, David Howells wrote:
> ZERO_PAGE can't go away, no need to hold an extra reference.
> 
> Signed-off-by: David Howells <dhowells@redhat.com>
> Reviewed-by: David Hildenbrand <david@redhat.com>

If you send this on this needs your signoff as well, btw.
John Hubbard Jan. 24, 2023, 7:25 p.m. UTC | #2
On 1/24/23 09:01, David Howells wrote:
> ZERO_PAGE can't go away, no need to hold an extra reference.
> 
> Signed-off-by: David Howells <dhowells@redhat.com>
> Reviewed-by: David Hildenbrand <david@redhat.com>
> ---
>   fs/iomap/direct-io.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: John Hubbard <jhubbard@nvidia.com>

thanks,
David Howells Jan. 24, 2023, 8:41 p.m. UTC | #3
Christoph Hellwig <hch@infradead.org> wrote:

> On Tue, Jan 24, 2023 at 05:01:03PM +0000, David Howells wrote:
> > ZERO_PAGE can't go away, no need to hold an extra reference.
> > 
> > Signed-off-by: David Howells <dhowells@redhat.com>
> > Reviewed-by: David Hildenbrand <david@redhat.com>
> 
> If you send this on this needs your signoff as well, btw.

Um.  You quoted my signoff.  Do you mean your signoff?

David
Christoph Hellwig Jan. 25, 2023, 6:28 a.m. UTC | #4
On Tue, Jan 24, 2023 at 08:41:53PM +0000, David Howells wrote:
> Christoph Hellwig <hch@infradead.org> wrote:
> 
> > On Tue, Jan 24, 2023 at 05:01:03PM +0000, David Howells wrote:
> > > ZERO_PAGE can't go away, no need to hold an extra reference.
> > > 
> > > Signed-off-by: David Howells <dhowells@redhat.com>
> > > Reviewed-by: David Hildenbrand <david@redhat.com>
> > 
> > If you send this on this needs your signoff as well, btw.
> 
> Um.  You quoted my signoff.  Do you mean your signoff?

Umm, I'm confused because you had my signoff on the last version :)
The patch is ok as-is.
diff mbox series

Patch

diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index 9804714b1751..47db4ead1e74 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -202,7 +202,7 @@  static void iomap_dio_zero(const struct iomap_iter *iter, struct iomap_dio *dio,
 	bio->bi_private = dio;
 	bio->bi_end_io = iomap_dio_bio_end_io;
 
-	get_page(page);
+	bio_set_flag(bio, BIO_NO_PAGE_REF);
 	__bio_add_page(bio, page, len, 0);
 	iomap_dio_submit_bio(iter, dio, bio, pos);
 }