mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
fs/ntfs3: Add check in ntfs_extend_initialized_size
Check arguments again after lock. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
parent
a8f659ce14
commit
db1d2b4cc9
@ -182,13 +182,15 @@ static int ntfs_extend_initialized_size(struct file *file,
|
||||
loff_t pos = valid;
|
||||
int err;
|
||||
|
||||
if (valid >= new_valid)
|
||||
return 0;
|
||||
|
||||
if (is_resident(ni)) {
|
||||
ni->i_valid = new_valid;
|
||||
return 0;
|
||||
}
|
||||
|
||||
WARN_ON(is_compressed(ni));
|
||||
WARN_ON(valid >= new_valid);
|
||||
|
||||
for (;;) {
|
||||
u32 zerofrom, len;
|
||||
|
Loading…
Reference in New Issue
Block a user