Commit 69505fe9 authored by Konstantin Komarov's avatar Konstantin Komarov

fs/ntfs3: Replace inode_trylock with inode_lock

The issue was detected due to xfstest 465 failing.

Fixes: 4342306f ("fs/ntfs3: Add file operations and implementation")
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 519f38de
...@@ -299,10 +299,7 @@ static int ntfs_file_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -299,10 +299,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment