aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-08-22 02:39:46 -0400
committerTheodore Ts'o <tytso@mit.edu>2008-08-22 02:43:59 -0400
commit2047e0a1eec1d128523e116f38b279f9cb8fe06b (patch)
treec23d90c518729a8d02fdee4e6c9c84502adc798a /lib
parenta9ea7285e6d97fba4fa4af059db73f0413acfcab (diff)
downloadandroid_external_e2fsprogs-2047e0a1eec1d128523e116f38b279f9cb8fe06b.tar.gz
android_external_e2fsprogs-2047e0a1eec1d128523e116f38b279f9cb8fe06b.tar.bz2
android_external_e2fsprogs-2047e0a1eec1d128523e116f38b279f9cb8fe06b.zip
ext2fs_extent_set_bmap(): fix bug when replacing a single block extent
When replacing a single block extent, make sure we set or clear the uninitialized extent flag as requested by the caller. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib')
-rw-r--r--lib/ext2fs/extent.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ext2fs/extent.c b/lib/ext2fs/extent.c
index 3df30929..02922720 100644
--- a/lib/ext2fs/extent.c
+++ b/lib/ext2fs/extent.c
@@ -1218,8 +1218,7 @@ errcode_t ext2fs_extent_set_bmap(ext2_extent_handle_t handle,
printf("(re/un)mapping only block in extent\n");
#endif
if (physical) {
- extent.e_pblk = physical;
- retval = ext2fs_extent_replace(handle, 0, &extent);
+ retval = ext2fs_extent_replace(handle, 0, &newextent);
} else {
retval = ext2fs_extent_delete(handle, 0);
if (retval)