[Ocfs2-tools-commits] taoma commits r1341 -
branches/sparse-files/libocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Sun Apr 15 19:39:38 PDT 2007
Author: taoma
Date: 2007-04-15 19:39:35 -0700 (Sun, 15 Apr 2007)
New Revision: 1341
Modified:
branches/sparse-files/libocfs2/extend_file.c
Log:
Commit 2 bugs found by jlbec in duplicate_extent_block. Thank Joel.
Modified: branches/sparse-files/libocfs2/extend_file.c
===================================================================
--- branches/sparse-files/libocfs2/extend_file.c 2007-04-12 02:57:13 UTC (rev 1340)
+++ branches/sparse-files/libocfs2/extend_file.c 2007-04-16 02:39:35 UTC (rev 1341)
@@ -1903,13 +1903,6 @@
memset(new_el->l_recs, 0,
sizeof(struct ocfs2_extent_rec) * new_el->l_count);
- ret = ocfs2_malloc_block(fs->fs_io, &eb_buf);
- if (ret)
- goto bail;
- ret = ocfs2_malloc_block(fs->fs_io, &new_eb_buf);
- if (ret)
- goto bail;
-
if (old_el->l_next_free_rec == 0) {
/* XXX:
* We have a tree depth > 0 and no extent record in it,
@@ -1919,6 +1912,13 @@
goto bail;
}
+ ret = ocfs2_malloc_block(fs->fs_io, &eb_buf);
+ if (ret)
+ goto bail;
+ ret = ocfs2_malloc_block(fs->fs_io, &new_eb_buf);
+ if (ret)
+ goto bail;
+
/* we iterate the extent list from the last one for recording
* the next_leaf_blk for the previous leaf.
*/
@@ -2082,8 +2082,7 @@
assert(el->l_tree_depth > 0);
- for (i = 0; i < el->l_next_free_rec; i++)
- free_duplicated_extent_block(fs, el);
+ free_duplicated_extent_block(fs, el);
}
/*
More information about the Ocfs2-tools-commits
mailing list