Skip to content

Commit

Permalink
dm-writeboost-target.c: Fix build error in 6.10
Browse files Browse the repository at this point in the history
bdev->bd_inode was removed in 6.10; replace it with bdev_nr_sectors
  • Loading branch information
WestonReed committed Oct 3, 2024
1 parent c0e5c82 commit 4a19fdf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dm-writeboost-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ int wb_io_internal(struct wb_device *wb, struct dm_io_request *io_req,

sector_t dm_devsize(struct dm_dev *dev)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0)
return i_size_read(dev->bdev->bd_inode) >> 9;
#else
return bdev_nr_sectors(dev->bdev);
#endif
}

/*----------------------------------------------------------------------------*/
Expand Down

0 comments on commit 4a19fdf

Please sign in to comment.