Skip to content

Commit ab08b01

Browse files
Christoph Hellwigdjwong
authored andcommitted
iomap: move struct iomap_page out of iomap.h
Now that all the writepage code is in the iomap code there is no need to keep this structure public. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Reviewed-by: Carlos Maiolino <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 3e19e6f commit ab08b01

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

fs/iomap/buffered-io.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,23 @@
2121

2222
#include "../internal.h"
2323

24+
/*
25+
* Structure allocated for each page when block size < PAGE_SIZE to track
26+
* sub-page uptodate status and I/O completions.
27+
*/
28+
struct iomap_page {
29+
atomic_t read_count;
30+
atomic_t write_count;
31+
DECLARE_BITMAP(uptodate, PAGE_SIZE / 512);
32+
};
33+
34+
static inline struct iomap_page *to_iomap_page(struct page *page)
35+
{
36+
if (page_has_private(page))
37+
return (struct iomap_page *)page_private(page);
38+
return NULL;
39+
}
40+
2441
static struct bio_set iomap_ioend_bioset;
2542

2643
static struct iomap_page *

include/linux/iomap.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -136,23 +136,6 @@ loff_t iomap_apply(struct inode *inode, loff_t pos, loff_t length,
136136
unsigned flags, const struct iomap_ops *ops, void *data,
137137
iomap_actor_t actor);
138138

139-
/*
140-
* Structure allocate for each page when block size < PAGE_SIZE to track
141-
* sub-page uptodate status and I/O completions.
142-
*/
143-
struct iomap_page {
144-
atomic_t read_count;
145-
atomic_t write_count;
146-
DECLARE_BITMAP(uptodate, PAGE_SIZE / 512);
147-
};
148-
149-
static inline struct iomap_page *to_iomap_page(struct page *page)
150-
{
151-
if (page_has_private(page))
152-
return (struct iomap_page *)page_private(page);
153-
return NULL;
154-
}
155-
156139
ssize_t iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *from,
157140
const struct iomap_ops *ops);
158141
int iomap_readpage(struct page *page, const struct iomap_ops *ops);

0 commit comments

Comments
 (0)