]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fallocate: avoid unnecessary computation
authorSami Kerola <kerolasa@iki.fi>
Wed, 16 Jul 2014 20:54:57 +0000 (21:54 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 17 Jul 2014 12:01:00 +0000 (14:01 +0200)
commit0407c1bef9f5bc39da0fcf2e21bc5bd8b48b5349
treebea5d6d977f5d3885699185b998d83e6c4de0c43
parent8a03628de9c8638172ec5991c4bcbc690cb2a56a
fallocate: avoid unnecessary computation

Where POSIX_FADV_SEQUENTIAL and HAVE_POSIX_FADVISE are not available it
is waste of resources to have variables that are meaningful only for
posix_fadvise().  Also initialize the variables immediately to correct
values, and since cachesz is never changed mark it read only.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/fallocate.c