tree-wide: port various pieces of code over to ROUND_UP()

There's probably more than we can convert to this.
This commit is contained in:
Lennart Poettering
2023-06-02 16:43:39 +02:00
parent beda8529b9
commit 4dcaab9c89
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -770,7 +770,7 @@ int unlinkat_deallocate(int fd, const char *name, UnlinkDeallocateFlags flags) {
* punch-hole/truncate this to release the disk space. */
bs = MAX(st.st_blksize, 512);
l = DIV_ROUND_UP(st.st_size, bs) * bs; /* Round up to next block size */
l = ROUND_UP(st.st_size, bs); /* Round up to next block size */
if (fallocate(truncate_fd, FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, 0, l) >= 0)
return 0; /* Successfully punched a hole! 😊 */