mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
fs/ntfs3: Do not call file_modified if collapse range failed
[ Upstream commit 2db86f7995fe6b62a4d6fee9f3cdeba3c6d27606 ]
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:
parent
939b4b2c00
commit
16f93bdd61
1 changed files with 3 additions and 1 deletions
|
@ -418,7 +418,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
|
||||
|
@ -553,6 +553,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue