From: Timo Sirainen Date: Thu, 21 Oct 2010 21:59:26 +0000 (+0100) Subject: file_preallocate(): Don't ignore ENOSPC with OSX either, caller will check it. X-Git-Tag: 2.0.7~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8effb0cf8f8ab0824ec637757acde7fe0da8fcbf;p=thirdparty%2Fdovecot%2Fcore.git file_preallocate(): Don't ignore ENOSPC with OSX either, caller will check it. --- diff --git a/src/lib/file-set-size.c b/src/lib/file-set-size.c index c2370feda1..148e45e45d 100644 --- a/src/lib/file-set-size.c +++ b/src/lib/file-set-size.c @@ -98,13 +98,8 @@ int file_preallocate(int fd ATTR_UNUSED, off_t size ATTR_UNUSED) fs.fst_offset = 0; fs.fst_length = size; fs.fst_bytesalloc = 0; - if (fcntl(fd, F_PREALLOCATE, &fs) < 0) { - if (errno == ENOSPC) { - /* can't allocate contiguous block. just forget it. */ - return 0; - } + if (fcntl(fd, F_PREALLOCATE, &fs) < 0) return -1; - } return 0; #else return 0;