Skip to contentSkip to conversation

iomap: Don't opencode SECTOR_SIZE macro

PATCH In review Nikolay Borisov 2 participants 2 messages Sep 10, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iomap: Don't opencode SECTOR_SIZE macro

---
 fs/iomap/buffered-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/iomap/buffered-io.c +1 -1
index 31eb680d8c64..4c688682236f 100644
@@ -29,7 +29,7 @@ struct iomap_page {
 	atomic_t		read_count;
 	atomic_t		write_count;
 	spinlock_t		uptodate_lock;
-	DECLARE_BITMAP(uptodate, PAGE_SIZE / 512);
+	DECLARE_BITMAP(uptodate, PAGE_SIZE / SECTOR_SIZE);
 };
 
 static inline struct iomap_page *to_iomap_page(struct page *page)
Signature · 1 line
2.17.1
#1 lore raw
Quoted 10 lines · Nikolay Borisov
---
 fs/iomap/buffered-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/iomap/buffered-io.c +0 -0
index 31eb680d8c64..4c688682236f 100644

fs/iomap/buffered-io.c struct iomap_page { · line 32

Quoted 5 lines
fs/iomap/buffered-io.c +1 -1
@@ -29,7 +29,7 @@ struct iomap_page {
 	atomic_t		read_count;
 	atomic_t		write_count;
 	spinlock_t		uptodate_lock;
-	DECLARE_BITMAP(uptodate, PAGE_SIZE / 512);
+	DECLARE_BITMAP(uptodate, PAGE_SIZE / SECTOR_SIZE);

FYI, Matthew Wilcox is (probably) going to replace this with a VLA in 5.10 as part of refactorings for THP support ("THP iomap patches for 5.10"), so I think I'll take that series instead.

--D

Quoted 6 lines
fs/iomap/buffered-io.c +0 -0
 };
 
 static inline struct iomap_page *to_iomap_page(struct page *page)
Signature · 1 line
2.17.1