Commit bc9a8bf7 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Make first argument of btrfs_run_delalloc_range directly an inode

Since this function is no longer a callback there is no need to have
its first argument obfuscated with a void *. Change it directly to a
pointer to an inode. No functional changes.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 9cf10cc1
...@@ -3261,7 +3261,7 @@ int btrfs_prealloc_file_range_trans(struct inode *inode, ...@@ -3261,7 +3261,7 @@ int btrfs_prealloc_file_range_trans(struct inode *inode,
struct btrfs_trans_handle *trans, int mode, struct btrfs_trans_handle *trans, int mode,
u64 start, u64 num_bytes, u64 min_size, u64 start, u64 num_bytes, u64 min_size,
loff_t actual_len, u64 *alloc_hint); loff_t actual_len, u64 *alloc_hint);
int btrfs_run_delalloc_range(void *private_data, struct page *locked_page, int btrfs_run_delalloc_range(struct inode *inode, struct page *locked_page,
u64 start, u64 end, int *page_started, unsigned long *nr_written, u64 start, u64 end, int *page_started, unsigned long *nr_written,
struct writeback_control *wbc); struct writeback_control *wbc);
int btrfs_writepage_cow_fixup(struct page *page, u64 start, u64 end); int btrfs_writepage_cow_fixup(struct page *page, u64 start, u64 end);
......
...@@ -1586,11 +1586,10 @@ static inline int need_force_cow(struct inode *inode, u64 start, u64 end) ...@@ -1586,11 +1586,10 @@ static inline int need_force_cow(struct inode *inode, u64 start, u64 end)
* Function to process delayed allocation (create CoW) for ranges which are * Function to process delayed allocation (create CoW) for ranges which are
* being touched for the first time. * being touched for the first time.
*/ */
int btrfs_run_delalloc_range(void *private_data, struct page *locked_page, int btrfs_run_delalloc_range(struct inode *inode, struct page *locked_page,
u64 start, u64 end, int *page_started, unsigned long *nr_written, u64 start, u64 end, int *page_started, unsigned long *nr_written,
struct writeback_control *wbc) struct writeback_control *wbc)
{ {
struct inode *inode = private_data;
int ret; int ret;
int force_cow = need_force_cow(inode, start, end); int force_cow = need_force_cow(inode, start, end);
unsigned int write_flags = wbc_to_write_flags(wbc); unsigned int write_flags = wbc_to_write_flags(wbc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment