summaryrefslogtreecommitdiff
path: root/debian/patches/ext2fs-skip-unallocated-blocks.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/ext2fs-skip-unallocated-blocks.patch')
-rw-r--r--debian/patches/ext2fs-skip-unallocated-blocks.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/debian/patches/ext2fs-skip-unallocated-blocks.patch b/debian/patches/ext2fs-skip-unallocated-blocks.patch
new file mode 100644
index 00000000..b98c1dc6
--- /dev/null
+++ b/debian/patches/ext2fs-skip-unallocated-blocks.patch
@@ -0,0 +1,17 @@
+diff --git a/ext2fs/pager.c b/ext2fs/pager.c
+index 6e99c83..4ea4b74 100644
+--- a/ext2fs/pager.c
++++ b/ext2fs/pager.c
+@@ -398,8 +398,10 @@ file_pager_write_page (struct node *node, vm_offset_t offset, void *buf)
+ err = find_block (node, offset, &block, &lock);
+ if (err)
+ break;
+- assert (block);
+- pending_blocks_add (&pb, block);
++ if (block)
++ pending_blocks_add (&pb, block);
++ else
++ pending_blocks_skip (&pb);
+ offset += block_size;
+ left -= block_size;
+ }