xfs_file_dirty is used to unshare reflink blocks. Rename the function to xfs_file_unshare to better document that purpose, and skip iomaps that are not shared and don't need zeroing. This will allow to simplify the caller.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -168,7 +168,7 @@ int iomap_migrate_page(struct address_space *mapping, struct page *newpage, · 167 unmodified lines | |||
| 168 | #else | 168 | #else |
| 169 | #define iomap_migrate_page NULL | 169 | #define iomap_migrate_page NULL |
| 170 | #endif | 170 | #endif |
| 171 | int iomap_file_dirty(struct inode *inode, loff_t pos, loff_t len, | 171 | int iomap_file_unshare(struct inode *inode, loff_t pos, loff_t len, |
| 172 | const struct iomap_ops *ops); | 172 | const struct iomap_ops *ops); |
| 173 | int iomap_zero_range(struct inode *inode, loff_t pos, loff_t len, | 173 | int iomap_zero_range(struct inode *inode, loff_t pos, loff_t len, |
| 174 | bool *did_zero, const struct iomap_ops *ops); | 174 | bool *did_zero, const struct iomap_ops *ops); |