======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Tainted: G             L     
------------------------------------------------------
syz.6.2798/13050 is trying to acquire lock:
ffff8881744f0640 (sb_internal){++++}-{0:0}, at: ext4_evict_inode+0x426/0x10c0

but task is already holding lock:
ffff888171ca8c18 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_ext_migrate+0x317/0x10e0

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&sbi->s_writepages_rwsem){++++}-{0:0}:
       percpu_down_read_internal+0x48/0x1c0
       ext4_writepages+0x205/0x3b0
       do_writepages+0x338/0x560
       __writeback_single_inode+0x12e/0xf90
       writeback_single_inode+0x4ef/0xe70
       write_inode_now+0x1c2/0x290
       iput+0x98b/0xf00
       ext4_xattr_block_set+0x1b0c/0x2a80
       ext4_expand_extra_isize_ea+0x1342/0x1e70
       __ext4_expand_extra_isize+0x30d/0x400
       __ext4_mark_inode_dirty+0x455/0x700
       ext4_evict_inode+0x976/0x10c0
       evict+0x624/0xb50
       ext4_orphan_cleanup+0xc7a/0x14c0
       ext4_fill_super+0x5cb4/0x65c0
       get_tree_bdev_flags+0x430/0x4f0
       vfs_get_tree+0x92/0x2a0
       do_new_mount+0x319/0xdc0
       __se_sys_mount+0x31d/0x420
       do_syscall_64+0x174/0x580
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (sb_internal){++++}-{0:0}:
       __lock_acquire+0x1520/0x2cf0
       lock_acquire+0x106/0x350
       percpu_down_read_internal+0x48/0x1c0
       ext4_evict_inode+0x426/0x10c0
       evict+0x624/0xb50
       ext4_ext_migrate+0xddf/0x10e0
       ext4_ioctl+0x2346/0x4b70
       __se_sys_ioctl+0xfc/0x170
       do_syscall_64+0x174/0x580
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&sbi->s_writepages_rwsem);
                               lock(sb_internal);
                               lock(&sbi->s_writepages_rwsem);
  rlock(sb_internal);

 *** DEADLOCK ***

3 locks held by syz.6.2798/13050:
 #0: ffff8881744f0450 (sb_writers#4){++++}-{0:0}, at: mnt_want_write_file+0x60/0x200
 #1: ffff888173d87400 (&sb->s_type->i_mutex_key#11){++++}-{4:4}, at: ext4_ioctl+0x233e/0x4b70
 #2: ffff888171ca8c18 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_ext_migrate+0x317/0x10e0

stack backtrace:
CPU: 1 UID: 0 PID: 13050 Comm: syz.6.2798 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_circular_bug+0x2e1/0x300
 check_noncircular+0x12e/0x150
 __lock_acquire+0x1520/0x2cf0
 lock_acquire+0x106/0x350
 percpu_down_read_internal+0x48/0x1c0
 ext4_evict_inode+0x426/0x10c0
 evict+0x624/0xb50
 ext4_ext_migrate+0xddf/0x10e0
 ext4_ioctl+0x2346/0x4b70
 __se_sys_ioctl+0xfc/0x170
 do_syscall_64+0x174/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f401cd9ce59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f401dcd8028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f401d016090 RCX: 00007f401cd9ce59
RDX: 0000000000000000 RSI: 0000000000006609 RDI: 0000000000000005
RBP: 00007f401ce32e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f401d016128 R14: 00007f401d016090 R15: 00007ffe0ab87648
 </TASK>
