linux-stable/fs/f2fs
Qilin Tan 9214a5484e f2fs: fix iostat lock protection
commit 144f1cd40b 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: 61803e9843 ("f2fs: fix iostat related lock protection")
Fixes: a1e09b03e6 ("f2fs: use iomap for direct I/O")
Signed-off-by: Qilin Tan <qilin.tan@mediatek.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Daniel Rosenberg <drosen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-14 11:09:31 +02:00
..
acl.c f2fs: clean up kvfree 2020-09-14 11:15:37 -07:00
acl.h f2fs: Use the correct style for SPDX License Identifier 2020-05-08 06:55:55 -07:00
checkpoint.c f2fs: fix to drop all dirty pages during umount() if cp_error is set 2023-05-30 12:57:49 +01:00
compress.c f2fs: compress: fix to call f2fs_wait_on_page_writeback() in f2fs_write_raw_pages() 2023-05-17 11:47:49 +02:00
data.c f2fs: fix to drop all dirty pages during umount() if cp_error is set 2023-05-30 12:57:49 +01:00
debug.c f2fs: avoid race condition for shrinker count 2021-01-06 14:56:54 +01:00
dir.c f2fs: reduce the scope of setting fsck tag when de->name_len is zero 2021-09-18 13:40:13 +02:00
extent_cache.c f2fs: let's avoid panic if extent_tree is not created 2023-01-24 07:19:56 +01:00
f2fs.h f2fs: enforce single zone capacity 2023-05-17 11:47:49 +02:00
file.c f2fs: handle dqget error in f2fs_transfer_project_quota() 2023-05-17 11:47:49 +02:00
gc.c f2fs: fix to do sanity check on i_extra_isize in is_alive() 2023-02-15 17:22:21 +01:00
gc.h f2fs: support age threshold based garbage collection 2020-09-11 11:11:15 -07:00
hash.c f2fs-for-5.8-rc1 2020-06-09 11:28:59 -07:00
inline.c f2fs: use memcpy_{to,from}_page() where possible 2023-03-11 16:40:09 +01:00
inode.c f2fs: fix to do sanity check for inline inode 2022-06-09 10:21:21 +02:00
Kconfig f2fs: compress: support lzo-rle compress algorithm 2020-05-11 20:36:46 -07:00
Makefile
namei.c f2fs: fix potential corruption when moving a directory 2023-05-17 11:48:15 +02:00
node.c f2fs: fix to avoid use f2fs_bug_on() in f2fs_new_node_page() 2022-08-25 11:38:21 +02:00
node.h f2fs: avoid race condition for shrinker count 2021-01-06 14:56:54 +01:00
recovery.c f2fs: fix to do sanity check on summary info 2022-10-26 13:25:12 +02:00
segment.c f2fs: apply zone capacity to all zone type 2023-05-17 11:47:49 +02:00
segment.h f2fs: apply zone capacity to all zone type 2023-05-17 11:47:49 +02:00
shrinker.c f2fs: avoid race condition for shrinker count 2021-01-06 14:56:54 +01:00
super.c f2fs: enforce single zone capacity 2023-05-17 11:47:49 +02:00
sysfs.c f2fs: fix iostat lock protection 2023-06-14 11:09:31 +02:00
trace.c
trace.h f2fs: Use the correct style for SPDX License Identifier 2020-05-08 06:55:55 -07:00
verity.c fs: f2fs: initialize fsdata in pagecache_write() 2023-03-11 16:40:09 +01:00
xattr.c f2fs: fix to do sanity check on last xattr entry in __f2fs_setxattr() 2021-12-29 12:26:05 +01:00
xattr.h f2fs: code cleanup by removing ifdef macro surrounding 2020-05-26 18:56:10 -07:00