Thread (33 messages) 33 messages, 3 authors, 2023-01-25
STALE1237d REVIEWED: 1 (0M)
Revisions (7)
  1. v8 [diff vs current]
  2. v9 current
  3. v10 [diff vs current]
  4. v11 [diff vs current]
  5. v12 [diff vs current]
  6. v13 [diff vs current]
  7. v14 [diff vs current]

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

From: David Howells <dhowells@redhat.com>
Date: 2023-01-24 17:02:57
Also in: linux-fsdevel, lkml
Subsystem: filesystems (vfs and infrastructure), filesystems [iomap], the rest · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds

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 <redacted>
---
 fs/iomap/direct-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
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);
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help