[4/5] btrfs: use memset_page instead of opencoding it

Message ID 20231121-josef-generic-163-v1-4-049e37185841@wdc.com
State New
Headers
Series btrfs: zoned: remove extent_buffer redirtying |

Commit Message

Johannes Thumshirn Nov. 21, 2023, 4:32 p.m. UTC
  Use memset_page() in memset_extent_buffer() instead of opencoding it.

This does not not change any functionality.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/btrfs/extent_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Christoph Hellwig Nov. 21, 2023, 5:04 p.m. UTC | #1
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
  

Patch

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 8bc5025ce278..b8a73ebe3485 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -4186,7 +4186,7 @@  static void memset_extent_buffer(const struct extent_buffer *eb, int c,
 		struct page *page = eb->pages[index];
 
 		assert_eb_page_uptodate(eb, page);
-		memset(page_address(page) + offset, c, cur_len);
+		memset_page(page, offset, c, cur_len);
 
 		cur += cur_len;
 	}