Re: [PATCH] loop: replace kill_bdev with invalidate_bdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 30, 2020 at 11:48:09AM +0800, Zheng Bin wrote:
> When a filesystem is mounting on a loop device and on a loop ioctl

s/mounting/mounted/ ?

> LOOP_SET_STATUS64, because of kill_bdev, buffer_head mappings are getting
> destroyed.
> kill_bdev
>   truncate_inode_pages
>     truncate_inode_pages_range
>       do_invalidatepage
>         block_invalidatepage
>           discard_buffer  -->clear BH_Mapped flag
> 
> sb_bread
>   __bread_gfp
>   bh = __getblk_gfp
>   -->discard_buffer clear BH_Mapped flag
>   __bread_slow
>     submit_bh
>       submit_bh_wbc
>         BUG_ON(!buffer_mapped(bh))  --> hit this BUG_ON
> 
> Fixes: 5db470e229e2 ("loop: drop caches if offset or block_size are changed")
> Signed-off-by: Zheng Bin <zhengbin13@xxxxxxxxxx>

Otherwise this looks reasonable:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

Can you also add a patch to now mark kill_bdev static in block_dev.c,
as this removed the last external users?



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux