Unverified Commit 2db86f79 authored by Konstantin Komarov's avatar Konstantin Komarov
Browse files

fs/ntfs3: Do not call file_modified if collapse range failed



Fixes: 4342306f ("fs/ntfs3: Add file operations and implementation")
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 9931122d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -484,7 +484,7 @@ static int ntfs_truncate(struct inode *inode, loff_t new_size)
}

/*
 * ntfs_fallocate
 * ntfs_fallocate - file_operations::ntfs_fallocate
 *
 * Preallocate space for a file. This implements ntfs's fallocate file
 * 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)
		ni_lock(ni);
		err = attr_collapse_range(ni, vbo, len);
		ni_unlock(ni);
		if (err)
			goto out;
	} else if (mode & FALLOC_FL_INSERT_RANGE) {
		/* Check new size. */
		err = inode_newsize_ok(inode, new_size);