mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
fs/ntfs3: Do not call file_modified if collapse range failed
[ Upstream commit2db86f7995] Fixes:4342306f0f("fs/ntfs3: Add file operations and implementation") Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3192e8d4a1
commit
4f63b25179
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user