Hi Greg, hi Sasha,
Please consider to include following fixes in to stable tree.
The 6 patches from Ming was fixing a deadlock, they are included around kernel
5.3/4. Would be good to included in 4.19, we hit it during testing, with the fix
we no longer hit the deadlock.
The last one is simple NULL pointer deref fix.
Thanks!
Jack Wang @ IONOS Cloud.
v1: https://lore.kernel.org/stable/20210203132022.92406-1-jinpu.wang@cloud.iono…
Ming Lei (6):
block: don't hold q->sysfs_lock in elevator_init_mq
blk-mq: don't hold q->sysfs_lock in blk_mq_map_swqueue
block: add helper for checking if queue is registered
block: split .sysfs_lock into two locks
block: fix race between switching elevator and removing queues
block: don't release queue's sysfs lock during switching elevator
zhengbin (1):
block: fix NULL pointer dereference in register_disk
block/blk-core.c | 1 +
block/blk-mq-sysfs.c | 12 +++++------
block/blk-mq.c | 7 ------
block/blk-sysfs.c | 49 +++++++++++++++++++++++++++---------------
block/blk-wbt.c | 2 +-
block/blk.h | 2 +-
block/elevator.c | 44 +++++++++++++++++++++----------------
block/genhd.c | 10 +++++----
include/linux/blkdev.h | 2 ++
9 files changed, 74 insertions(+), 55 deletions(-)
--
2.25.1
> If mounted with discard option, exFAT issues discard command when clear cluster bit to remove file.
> But the input parameter of cluster-to-sector calculation is abnormally added by reserved cluster size
> which is 2, leading to discard unrelated sectors included in target+2 cluster.
> With fixing this, remove the wrong comments in set/clear/find bitmap functions.
>
> Fixes: 1e49a94cf707 ("exfat: add bitmap operations")
Cc: stable(a)vger.kernel.org # v5.7+
> Signed-off-by: Hyeongseok Kim <hyeongseok(a)gmail.com>
> Acked-by: Sungjong Seo <sj1557.seo(a)samsung.com>
Applied. Thanks for your patch!
> ---
> fs/exfat/balloc.c | 15 +--------------
> 1 file changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/fs/exfat/balloc.c b/fs/exfat/balloc.c index 761c79c3a4ba..54f1bcbddb26 100644
> --- a/fs/exfat/balloc.c
> +++ b/fs/exfat/balloc.c
> @@ -141,10 +141,6 @@ void exfat_free_bitmap(struct exfat_sb_info *sbi)
> kfree(sbi->vol_amap);
> }
>
> -/*
> - * If the value of "clu" is 0, it means cluster 2 which is the first cluster of
> - * the cluster heap.
> - */
> int exfat_set_bitmap(struct inode *inode, unsigned int clu) {
> int i, b;
> @@ -162,10 +158,6 @@ int exfat_set_bitmap(struct inode *inode, unsigned int clu)
> return 0;
> }
>
> -/*
> - * If the value of "clu" is 0, it means cluster 2 which is the first cluster of
> - * the cluster heap.
> - */
> void exfat_clear_bitmap(struct inode *inode, unsigned int clu, bool sync) {
> int i, b;
> @@ -186,8 +178,7 @@ void exfat_clear_bitmap(struct inode *inode, unsigned int clu, bool sync)
> int ret_discard;
>
> ret_discard = sb_issue_discard(sb,
> - exfat_cluster_to_sector(sbi, clu +
> - EXFAT_RESERVED_CLUSTERS),
> + exfat_cluster_to_sector(sbi, clu),
> (1 << sbi->sect_per_clus_bits), GFP_NOFS, 0);
>
> if (ret_discard == -EOPNOTSUPP) {
> @@ -197,10 +188,6 @@ void exfat_clear_bitmap(struct inode *inode, unsigned int clu, bool sync)
> }
> }
>
> -/*
> - * If the value of "clu" is 0, it means cluster 2 which is the first cluster of
> - * the cluster heap.
> - */
> unsigned int exfat_find_free_bitmap(struct super_block *sb, unsigned int clu) {
> unsigned int i, map_i, map_b, ent_idx;
> --
> 2.27.0.83.g0313f36