From b5bcb94f3e53138d2528e7db112123b24865681a Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 18 Jan 1996 23:54:18 +0000 Subject: (diskfs_S_file_get_storage_info): Calculate the right value for *RUNS_LEN. --- ext2fs/storeinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext2fs/storeinfo.c') 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; -- cgit v1.2.3