]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
file_preallocate(): Don't ignore ENOSPC with OSX either, caller will check it.
authorTimo Sirainen <tss@iki.fi>
Thu, 21 Oct 2010 21:59:26 +0000 (22:59 +0100)
committerTimo Sirainen <tss@iki.fi>
Thu, 21 Oct 2010 21:59:26 +0000 (22:59 +0100)
src/lib/file-set-size.c

index c2370feda17a3a66e536c44628dc836f9f3091f7..148e45e45dcc52472ce051be89f088d99aa8eddd 100644 (file)
@@ -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;