s3: smbd: Fix *allocate* calls to follow POSIX error return convention.
commit339bac87b3f83a7a5c0b0c4a8285604c300521ef
authorJeremy Allison <jra@samba.org>
Fri, 5 Dec 2014 23:31:19 +0000 (5 15:31 -0800)
committerKarolin Seeger <kseeger@samba.org>
Thu, 18 Dec 2014 20:30:05 +0000 (18 21:30 +0100)
tree04854211e8fce3bc9b609804c9fd18633ff5310a
parentb1adeee4aed02f3066f9a96f20daeb3dce43b68c
s3: smbd: Fix *allocate* calls to follow POSIX error return convention.

vfswrap_fallocate() is broken in that it can call posix_fallocate()
which returns an int error (and doesn't set errno) but can also
call Linux fallocate() which returns -1 and sets errno.

Standardize on the -1,errno convention.

Reported by Jones <jones.kstw@gmail.com> who provided the
initial patch. This patch tested and confirmed working
by him as well.

https://bugzilla.samba.org/show_bug.cgi?id=10982

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
(cherry picked from commit c9235deee0fc49c99cfaf2329b7af526d9dd12d0)
source3/modules/vfs_default.c