summaryrefslogtreecommitdiff
path: root/fatfs/pager.c
diff options
context:
space:
mode:
Diffstat (limited to 'fatfs/pager.c')
-rw-r--r--fatfs/pager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fatfs/pager.c b/fatfs/pager.c
index 61cf7cf7..ef5a945b 100644
--- a/fatfs/pager.c
+++ b/fatfs/pager.c
@@ -106,7 +106,7 @@ find_cluster (struct node *node, vm_offset_t offset,
rwlock_reader_lock (*lock);
}
- if (offset + bytes_per_cluster > node->allocsize)
+ if (round_cluster (offset) > node->allocsize)
return EIO;
err = fat_getcluster (node, offset >> log2_bytes_per_cluster, 0, cluster);