ocfs2: Add a name indexed b-tree to directory inodes
[deliverable/linux.git] / fs / ocfs2 / inode.c
index 229e707bc050629c0ad372b14c75194bf4b97f3d..d273c4a51a009e0d7915752588be8193c24dbbe2 100644 (file)
@@ -38,6 +38,7 @@
 #include "ocfs2.h"
 
 #include "alloc.h"
+#include "dir.h"
 #include "blockcheck.h"
 #include "dlmglue.h"
 #include "extent_map.h"
@@ -606,7 +607,7 @@ static int ocfs2_remove_inode(struct inode *inode,
        }
 
        handle = ocfs2_start_trans(osb, OCFS2_DELETE_INODE_CREDITS +
-                                       ocfs2_quota_trans_credits(inode->i_sb));
+                                  ocfs2_quota_trans_credits(inode->i_sb));
        if (IS_ERR(handle)) {
                status = PTR_ERR(handle);
                mlog_errno(status);
@@ -740,6 +741,15 @@ static int ocfs2_wipe_inode(struct inode *inode,
                goto bail_unlock_dir;
        }
 
+       /* Remove any dir index tree */
+       if (S_ISDIR(inode->i_mode)) {
+               status = ocfs2_dx_dir_truncate(inode, di_bh);
+               if (status) {
+                       mlog_errno(status);
+                       goto bail_unlock_dir;
+               }
+       }
+
        /*Free extended attribute resources associated with this inode.*/
        status = ocfs2_xattr_remove(inode, di_bh);
        if (status < 0) {
This page took 0.043857 seconds and 5 git commands to generate.