Skip to content

Commit 69505fe

Browse files
fs/ntfs3: Replace inode_trylock with inode_lock
The issue was detected due to xfstest 465 failing. Fixes: 4342306 ("fs/ntfs3: Add file operations and implementation") Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 519f38d commit 69505fe

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fs/ntfs3/file.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,7 @@ static int ntfs_file_mmap(struct file *file, struct vm_area_struct *vma)
299299
}
300300

301301
if (ni->i_valid < to) {
302-
if (!inode_trylock(inode)) {
303-
err = -EAGAIN;
304-
goto out;
305-
}
302+
inode_lock(inode);
306303
err = ntfs_extend_initialized_size(file, ni,
307304
ni->i_valid, to);
308305
inode_unlock(inode);

0 commit comments

Comments
 (0)