mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
ntfs: convert iomap ops to ->iomap_next()
Convert ntfs iomap_ops to the new ->iomap_next() callback. Each callback is generated with the DEFINE_IOMAP_ITER_NEXT()/DEFINE_IOMAP_ITER_NEXT_END() macros, which wrap the iomap_iter_next() helper to finish the previous mapping if needed and produce the next one. No functional changes are intended. Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Joanne Koong <joannelkoong@gmail.com> Link: https://patch.msgid.link/20260729192737.3190206-10-joannelkoong@gmail.com Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
9aff0a5221
commit
7a7bf75516
|
|
@ -277,8 +277,10 @@ static int ntfs_read_iomap_begin(struct inode *inode, loff_t offset, loff_t leng
|
|||
srcmap, true);
|
||||
}
|
||||
|
||||
static DEFINE_IOMAP_ITER_NEXT(ntfs_read_iomap_next, ntfs_read_iomap_begin);
|
||||
|
||||
const struct iomap_ops ntfs_read_iomap_ops = {
|
||||
.iomap_begin = ntfs_read_iomap_begin,
|
||||
.iomap_next = ntfs_read_iomap_next,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -329,13 +331,17 @@ static int ntfs_zero_read_iomap_end(struct inode *inode, loff_t pos, loff_t leng
|
|||
return written;
|
||||
}
|
||||
|
||||
static DEFINE_IOMAP_ITER_NEXT_END(ntfs_zero_read_iomap_next,
|
||||
ntfs_seek_iomap_begin, ntfs_zero_read_iomap_end);
|
||||
|
||||
static const struct iomap_ops ntfs_zero_read_iomap_ops = {
|
||||
.iomap_begin = ntfs_seek_iomap_begin,
|
||||
.iomap_end = ntfs_zero_read_iomap_end,
|
||||
.iomap_next = ntfs_zero_read_iomap_next,
|
||||
};
|
||||
|
||||
static DEFINE_IOMAP_ITER_NEXT(ntfs_seek_iomap_next, ntfs_seek_iomap_begin);
|
||||
|
||||
const struct iomap_ops ntfs_seek_iomap_ops = {
|
||||
.iomap_begin = ntfs_seek_iomap_begin,
|
||||
.iomap_next = ntfs_seek_iomap_next,
|
||||
};
|
||||
|
||||
int ntfs_dio_zero_range(struct inode *inode, loff_t offset, loff_t length)
|
||||
|
|
@ -764,9 +770,11 @@ static int ntfs_write_iomap_end(struct inode *inode, loff_t pos, loff_t length,
|
|||
return written;
|
||||
}
|
||||
|
||||
static DEFINE_IOMAP_ITER_NEXT_END(ntfs_write_iomap_next,
|
||||
ntfs_write_iomap_begin, ntfs_write_iomap_end);
|
||||
|
||||
const struct iomap_ops ntfs_write_iomap_ops = {
|
||||
.iomap_begin = ntfs_write_iomap_begin,
|
||||
.iomap_end = ntfs_write_iomap_end,
|
||||
.iomap_next = ntfs_write_iomap_next,
|
||||
};
|
||||
|
||||
static int ntfs_page_mkwrite_iomap_begin(struct inode *inode, loff_t offset,
|
||||
|
|
@ -777,9 +785,11 @@ static int ntfs_page_mkwrite_iomap_begin(struct inode *inode, loff_t offset,
|
|||
NTFS_IOMAP_FLAGS_MKWRITE);
|
||||
}
|
||||
|
||||
static DEFINE_IOMAP_ITER_NEXT_END(ntfs_page_mkwrite_iomap_next,
|
||||
ntfs_page_mkwrite_iomap_begin, ntfs_write_iomap_end);
|
||||
|
||||
const struct iomap_ops ntfs_page_mkwrite_iomap_ops = {
|
||||
.iomap_begin = ntfs_page_mkwrite_iomap_begin,
|
||||
.iomap_end = ntfs_write_iomap_end,
|
||||
.iomap_next = ntfs_page_mkwrite_iomap_next,
|
||||
};
|
||||
|
||||
static int ntfs_dio_iomap_begin(struct inode *inode, loff_t offset,
|
||||
|
|
@ -790,9 +800,11 @@ static int ntfs_dio_iomap_begin(struct inode *inode, loff_t offset,
|
|||
NTFS_IOMAP_FLAGS_DIO);
|
||||
}
|
||||
|
||||
static DEFINE_IOMAP_ITER_NEXT_END(ntfs_dio_iomap_next,
|
||||
ntfs_dio_iomap_begin, ntfs_write_iomap_end);
|
||||
|
||||
const struct iomap_ops ntfs_dio_iomap_ops = {
|
||||
.iomap_begin = ntfs_dio_iomap_begin,
|
||||
.iomap_end = ntfs_write_iomap_end,
|
||||
.iomap_next = ntfs_dio_iomap_next,
|
||||
};
|
||||
|
||||
static ssize_t ntfs_writeback_range(struct iomap_writepage_ctx *wpc,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user