Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 2db86f7

Browse files
fs/ntfs3: Do not call file_modified if collapse range failed
Fixes: 4342306 ("fs/ntfs3: Add file operations and implementation") Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 9931122 commit 2db86f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/ntfs3/file.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ static int ntfs_truncate(struct inode *inode, loff_t new_size)
484484
}
485485

486486
/*
487-
* ntfs_fallocate
487+
* ntfs_fallocate - file_operations::ntfs_fallocate
488488
*
489489
* Preallocate space for a file. This implements ntfs's fallocate file
490490
* operation, which gets called from sys_fallocate system call. User
@@ -619,6 +619,8 @@ static long ntfs_fallocate(struct file *file, int mode, loff_t vbo, loff_t len)
619619
ni_lock(ni);
620620
err = attr_collapse_range(ni, vbo, len);
621621
ni_unlock(ni);
622+
if (err)
623+
goto out;
622624
} else if (mode & FALLOC_FL_INSERT_RANGE) {
623625
/* Check new size. */
624626
err = inode_newsize_ok(inode, new_size);

0 commit comments

Comments
 (0)