diff options
author | ChenXiaoSong <[email protected]> | 2022-11-19 12:51:59 +0800 |
---|---|---|
committer | Steve French <[email protected]> | 2022-11-21 10:27:03 -0600 |
commit | 502487847743018c93d75b401eac2ea4c4973123 (patch) | |
tree | 7821e0752f01b482f15b7438b0ed04dafae75dbf /lib/mpi/mpi-mod.c | |
parent | f391d6ee002ea022c62dc0b09d0578f3ccce81be (diff) |
cifs: fix missing unlock in cifs_file_copychunk_range()
xfstests generic/013 and generic/476 reported WARNING as follows:
WARNING: lock held when returning to user space!
6.1.0-rc5+ #4 Not tainted
------------------------------------------------
fsstress/504233 is leaving the kernel with locks still held!
2 locks held by fsstress/504233:
#0: ffff888054c38850 (&sb->s_type->i_mutex_key#21){+.+.}-{3:3}, at:
lock_two_nondirectories+0xcf/0xf0
#1: ffff8880b8fec750 (&sb->s_type->i_mutex_key#21/4){+.+.}-{3:3}, at:
lock_two_nondirectories+0xb7/0xf0
This will lead to deadlock and hungtask.
Fix this by releasing locks when failed to write out on a file range in
cifs_file_copychunk_range().
Fixes: 3e3761f1ec7d ("smb3: use filemap_write_and_wait_range instead of filemap_write_and_wait")
Cc: [email protected] # 6.0
Reviewed-by: Paulo Alcantara (SUSE) <[email protected]>
Signed-off-by: ChenXiaoSong <[email protected]>
Signed-off-by: Steve French <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions