|
@@ -172,8 +172,9 @@ blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
|
|
struct file *file = iocb->ki_filp;
|
|
struct file *file = iocb->ki_filp;
|
|
struct inode *inode = file->f_mapping->host;
|
|
struct inode *inode = file->f_mapping->host;
|
|
|
|
|
|
- return blockdev_direct_IO_no_locking(rw, iocb, inode, I_BDEV(inode),
|
|
|
|
- iov, offset, nr_segs, blkdev_get_blocks, NULL);
|
|
|
|
|
|
+ return blockdev_direct_IO_no_locking_newtrunc(rw, iocb, inode,
|
|
|
|
+ I_BDEV(inode), iov, offset, nr_segs,
|
|
|
|
+ blkdev_get_blocks, NULL);
|
|
}
|
|
}
|
|
|
|
|
|
int __sync_blockdev(struct block_device *bdev, int wait)
|
|
int __sync_blockdev(struct block_device *bdev, int wait)
|
|
@@ -309,8 +310,8 @@ static int blkdev_write_begin(struct file *file, struct address_space *mapping,
|
|
struct page **pagep, void **fsdata)
|
|
struct page **pagep, void **fsdata)
|
|
{
|
|
{
|
|
*pagep = NULL;
|
|
*pagep = NULL;
|
|
- return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
|
|
|
|
- blkdev_get_block);
|
|
|
|
|
|
+ return block_write_begin_newtrunc(file, mapping, pos, len, flags,
|
|
|
|
+ pagep, fsdata, blkdev_get_block);
|
|
}
|
|
}
|
|
|
|
|
|
static int blkdev_write_end(struct file *file, struct address_space *mapping,
|
|
static int blkdev_write_end(struct file *file, struct address_space *mapping,
|