mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
Revert "fs/ntfs3: Replace inode_trylock with inode_lock"
[ Upstream commita49f0abd89
] This reverts commit69505fe98f
. Initially, conditional lock acquisition was removed to fix an xfstest bug that was observed during internal testing. The deadlock reported by syzbot is resolved by reintroducing conditional acquisition. The xfstest bug no longer occurs on kernel version 6.16-rc1 during internal testing. I assume that changes in other modules may have contributed to this. Fixes:69505fe98f
("fs/ntfs3: Replace inode_trylock with inode_lock") Reported-by: syzbot+a91fcdbd2698f99db8f4@syzkaller.appspotmail.com Suggested-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a19ce9230b
commit
1903a6c1f2
|
@ -317,7 +317,10 @@ static int ntfs_file_mmap(struct file *file, struct vm_area_struct *vma)
|
|||
}
|
||||
|
||||
if (ni->i_valid < to) {
|
||||
inode_lock(inode);
|
||||
if (!inode_trylock(inode)) {
|
||||
err = -EAGAIN;
|
||||
goto out;
|
||||
}
|
||||
err = ntfs_extend_initialized_size(file, ni,
|
||||
ni->i_valid, to);
|
||||
inode_unlock(inode);
|
||||
|
|
Loading…
Reference in New Issue
Block a user