We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9baf50d commit 39c3b4eCopy full SHA for 39c3b4e
block/fops.c
@@ -668,8 +668,8 @@ static ssize_t blkdev_buffered_write(struct kiocb *iocb, struct iov_iter *from)
668
static ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from)
669
{
670
struct file *file = iocb->ki_filp;
671
- struct block_device *bdev = I_BDEV(file->f_mapping->host);
672
- struct inode *bd_inode = bdev->bd_inode;
+ struct inode *bd_inode = bdev_file_inode(file);
+ struct block_device *bdev = I_BDEV(bd_inode);
673
loff_t size = bdev_nr_bytes(bdev);
674
size_t shorted = 0;
675
ssize_t ret;
0 commit comments