[Ocfs2-tools-devel] A patch for function ocfs2_expand_dir in
libocfs2.
tao.ma
tao.ma at oracle.com
Tue Apr 10 19:12:05 PDT 2007
Set "cinode" to NULL after the function ocfs2_free_cached_inode.
In the original code, if ocfs2_extend_allocation fails, another
ocfs2_free_cached_inode will be called at "bail" and make the program
segment fault.
-------------- next part --------------
Index: libocfs2/expanddir.c
===================================================================
--- libocfs2/expanddir.c (revision 1338)
+++ libocfs2/expanddir.c (working copy)
@@ -74,6 +74,7 @@ errcode_t ocfs2_expand_dir(ocfs2_filesys
if (used_blks >= totl_blks) {
ocfs2_free_cached_inode(fs, cinode);
+ cinode = NULL;
/* extend the directory */
ret = ocfs2_extend_allocation(fs, dir, 1);
More information about the Ocfs2-tools-devel
mailing list