diff options
| author | 2024-05-30 10:54:07 +0300 | |
|---|---|---|
| committer | 2024-06-26 15:48:50 +0300 | |
| commit | 69505fe98f198ee813898cbcaf6770949636430b (patch) | |
| tree | 577de428b6f28e46187d9245c8d7d0d6717980f1 | |
| parent | fs/ntfs3: Fix attr_insert_range at end of file (diff) | |
| download | wireguard-linux-69505fe98f198ee813898cbcaf6770949636430b.tar.xz wireguard-linux-69505fe98f198ee813898cbcaf6770949636430b.zip | |
fs/ntfs3: Replace inode_trylock with inode_lock
The issue was detected due to xfstest 465 failing.
Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation")
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
| -rw-r--r-- | fs/ntfs3/file.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c index 2f903b6ce157..9ae202901f3c 100644 --- a/fs/ntfs3/file.c +++ b/fs/ntfs3/file.c @@ -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); |
