ntfs_attr_truncate check if newsize is equal to na->data_size and don't do anything in this case

(Logical change 1.603)
edge.strict_endians
(none)!yura 2004-10-11 16:26:16 +00:00
parent 8dd4f91c86
commit 324ed328f5
1 changed files with 3 additions and 0 deletions

View File

@ -4242,6 +4242,9 @@ int ntfs_attr_truncate(ntfs_attr *na, const s64 newsize)
errno = EINVAL;
return -1;
}
if (na->data_size == newsize)
return 0;
/*
* Encrypted attributes are not supported. We return access denied,
* which is what Windows NT4 does, too.