mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
direct-io: eliminate the offset argument to ->direct_IO
Including blkdev_direct_IO and dax_do_io. It has to be ki_pos to actually work, so eliminate the superflous argument. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
13712713ca
commit
c8b8e32d70
37 changed files with 99 additions and 112 deletions
|
@ -3279,15 +3279,14 @@ static int reiserfs_releasepage(struct page *page, gfp_t unused_gfp_flags)
|
|||
* We thank Mingming Cao for helping us understand in great detail what
|
||||
* to do in this section of the code.
|
||||
*/
|
||||
static ssize_t reiserfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
static ssize_t reiserfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
size_t count = iov_iter_count(iter);
|
||||
ssize_t ret;
|
||||
|
||||
ret = blockdev_direct_IO(iocb, inode, iter, offset,
|
||||
ret = blockdev_direct_IO(iocb, inode, iter,
|
||||
reiserfs_get_blocks_direct_io);
|
||||
|
||||
/*
|
||||
|
@ -3296,7 +3295,7 @@ static ssize_t reiserfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
|||
*/
|
||||
if (unlikely(iov_iter_rw(iter) == WRITE && ret < 0)) {
|
||||
loff_t isize = i_size_read(inode);
|
||||
loff_t end = offset + count;
|
||||
loff_t end = iocb->ki_pos + count;
|
||||
|
||||
if ((end > isize) && inode_newsize_ok(inode, isize) == 0) {
|
||||
truncate_setsize(inode, isize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue