summaryrefslogtreecommitdiff
path: root/ext2fs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-01-18 23:54:18 +0000
committerMiles Bader <miles@gnu.org>1996-01-18 23:54:18 +0000
commitb5bcb94f3e53138d2528e7db112123b24865681a (patch)
treeede60305969e0b8d111d4452a863a537db27b9ec /ext2fs
parent3b66d445cfb0646820a887720c20e095cbbd454c (diff)
(diskfs_S_file_get_storage_info): Calculate the right value for *RUNS_LEN.
Diffstat (limited to 'ext2fs')
-rw-r--r--ext2fs/storeinfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext2fs/storeinfo.c b/ext2fs/storeinfo.c
index bd7e539a..cd67db16 100644
--- a/ext2fs/storeinfo.c
+++ b/ext2fs/storeinfo.c
@@ -106,8 +106,8 @@ diskfs_S_file_get_storage_info (struct protid *cred, int *class,
{
if (run[0] >= 0)
/* Include the current run, as long as it's not a hole. */
- runs += 2;
- else if (((vm_address_t)run % vm_page_size) == 0)
+ run += 2;
+ else if ((off_t *)trunc_page (run) == run)
/* We allocated just *one* too many pages -- the last run is a hole. */
vm_deallocate (mach_task_self (), (vm_address_t)run, vm_page_size);
*runs_len = run - *runs;