Skip to content

Commit

Permalink
btrfs: drop unused parameter iov_iter from btrfs_write_check()
Browse files Browse the repository at this point in the history
The parameter 'from' has never been used since commit b8d8e1f
("btrfs: introduce btrfs_write_check()"), this is for buffered write.
Direct io write needs it so it was probably an interface thing, but we
can drop it.

Reviewed-by: Anand Jain <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kdave committed Nov 11, 2024
1 parent 590168e commit cc5fe81
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fs/btrfs/direct-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from)
return ret;
}

ret = btrfs_write_check(iocb, from, ret);
ret = btrfs_write_check(iocb, ret);
if (ret < 0) {
btrfs_inode_unlock(BTRFS_I(inode), ilock_flags);
goto out;
Expand Down
6 changes: 3 additions & 3 deletions fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ static void update_time_for_write(struct inode *inode)
inode_inc_iversion(inode);
}

int btrfs_write_check(struct kiocb *iocb, struct iov_iter *from, size_t count)
int btrfs_write_check(struct kiocb *iocb, size_t count)
{
struct file *file = iocb->ki_filp;
struct inode *inode = file_inode(file);
Expand Down Expand Up @@ -1222,7 +1222,7 @@ ssize_t btrfs_buffered_write(struct kiocb *iocb, struct iov_iter *i)
if (ret <= 0)
goto out;

ret = btrfs_write_check(iocb, i, ret);
ret = btrfs_write_check(iocb, ret);
if (ret < 0)
goto out;

Expand Down Expand Up @@ -1467,7 +1467,7 @@ static ssize_t btrfs_encoded_write(struct kiocb *iocb, struct iov_iter *from,
if (ret || encoded->len == 0)
goto out;

ret = btrfs_write_check(iocb, from, encoded->len);
ret = btrfs_write_check(iocb, encoded->len);
if (ret < 0)
goto out;

Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void btrfs_check_nocow_unlock(struct btrfs_inode *inode);
bool btrfs_find_delalloc_in_range(struct btrfs_inode *inode, u64 start, u64 end,
struct extent_state **cached_state,
u64 *delalloc_start_ret, u64 *delalloc_end_ret);
int btrfs_write_check(struct kiocb *iocb, struct iov_iter *from, size_t count);
int btrfs_write_check(struct kiocb *iocb, size_t count);
ssize_t btrfs_buffered_write(struct kiocb *iocb, struct iov_iter *i);

#endif

0 comments on commit cc5fe81

Please sign in to comment.