Skip to content
Commit 3b07425c authored by Qilin Tan's avatar Qilin Tan Committed by Greg Kroah-Hartman
Browse files

f2fs: fix iostat lock protection



commit 144f1cd4 upstream.

Made iostat lock irq safe to avoid potentinal deadlock.

Deadlock scenario:
f2fs_attr_store
  -> f2fs_sbi_store
  -> _sbi_store
  -> spin_lock(sbi->iostat_lock)
    <interrupt request>
    -> scsi_end_request
    -> bio_endio
    -> f2fs_dio_read_end_io
    -> f2fs_update_iostat
    -> spin_lock_irqsave(sbi->iostat_lock)  ===> Dead lock here

Fixes: 61803e98 ("f2fs: fix iostat related lock protection")
Fixes: a1e09b03 ("f2fs: use iomap for direct I/O")
Signed-off-by: default avatarQilin Tan <qilin.tan@mediatek.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Cc: Daniel Rosenberg <drosen@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b85fb01a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment