|
23 | 23 |
|
24 | 24 | #define IOEND_BATCH_SIZE 4096
|
25 | 25 |
|
| 26 | +typedef int (*iomap_punch_t)(struct inode *inode, loff_t offset, loff_t length); |
26 | 27 | /*
|
27 | 28 | * Structure allocated for each folio to track per-block uptodate state
|
28 | 29 | * and I/O completions.
|
@@ -901,7 +902,7 @@ EXPORT_SYMBOL_GPL(iomap_file_buffered_write);
|
901 | 902 | */
|
902 | 903 | static int iomap_write_delalloc_scan(struct inode *inode,
|
903 | 904 | loff_t *punch_start_byte, loff_t start_byte, loff_t end_byte,
|
904 |
| - int (*punch)(struct inode *inode, loff_t offset, loff_t length)) |
| 905 | + iomap_punch_t punch) |
905 | 906 | {
|
906 | 907 | while (start_byte < end_byte) {
|
907 | 908 | struct folio *folio;
|
@@ -979,8 +980,7 @@ static int iomap_write_delalloc_scan(struct inode *inode,
|
979 | 980 | * the code to subtle off-by-one bugs....
|
980 | 981 | */
|
981 | 982 | static int iomap_write_delalloc_release(struct inode *inode,
|
982 |
| - loff_t start_byte, loff_t end_byte, |
983 |
| - int (*punch)(struct inode *inode, loff_t pos, loff_t length)) |
| 983 | + loff_t start_byte, loff_t end_byte, iomap_punch_t punch) |
984 | 984 | {
|
985 | 985 | loff_t punch_start_byte = start_byte;
|
986 | 986 | loff_t scan_end_byte = min(i_size_read(inode), end_byte);
|
@@ -1073,8 +1073,7 @@ static int iomap_write_delalloc_release(struct inode *inode,
|
1073 | 1073 | */
|
1074 | 1074 | int iomap_file_buffered_write_punch_delalloc(struct inode *inode,
|
1075 | 1075 | struct iomap *iomap, loff_t pos, loff_t length,
|
1076 |
| - ssize_t written, |
1077 |
| - int (*punch)(struct inode *inode, loff_t pos, loff_t length)) |
| 1076 | + ssize_t written, iomap_punch_t punch) |
1078 | 1077 | {
|
1079 | 1078 | loff_t start_byte;
|
1080 | 1079 | loff_t end_byte;
|
|
0 commit comments