fs/ntfs3: Replace inode_trylock with inode_lock

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>
This commit is contained in:
Konstantin Komarov 2024-05-30 10:54:07 +03:00
parent 519f38de57
commit 69505fe98f
No known key found for this signature in database
GPG Key ID: A9B0331F832407B6

View File

@ -299,10 +299,7 @@ static int ntfs_file_mmap(struct file *file, struct vm_area_struct *vma)
}
if (ni->i_valid < to) {
if (!inode_trylock(inode)) {
err = -EAGAIN;
goto out;
}
inode_lock(inode);
err = ntfs_extend_initialized_size(file, ni,
ni->i_valid, to);
inode_unlock(inode);