mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
fs/ntfs3: Replace inode_trylock with inode_lock
[ Upstream commit 69505fe98f198ee813898cbcaf6770949636430b ]
The issue was detected due to xfstest 465 failing.
Fixes: 4342306f0f ("fs/ntfs3: Add file operations and implementation")
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
be4d557cbf
commit
7a498fc945
@@ -396,10 +396,7 @@ static int ntfs_file_mmap(struct file *file, struct vm_area_struct *vma)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ni->i_valid < to) {
|
if (ni->i_valid < to) {
|
||||||
if (!inode_trylock(inode)) {
|
inode_lock(inode);
|
||||||
err = -EAGAIN;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
err = ntfs_extend_initialized_size(file, ni,
|
err = ntfs_extend_initialized_size(file, ni,
|
||||||
ni->i_valid, to);
|
ni->i_valid, to);
|
||||||
inode_unlock(inode);
|
inode_unlock(inode);
|
||||||
|
|||||||
Reference in New Issue
Block a user