diff options
Diffstat (limited to 'fs/ocfs2/inode.c')
-rw-r--r-- | fs/ocfs2/inode.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 229e707bc050..d273c4a51a00 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include "ocfs2.h" | 38 | #include "ocfs2.h" |
39 | 39 | ||
40 | #include "alloc.h" | 40 | #include "alloc.h" |
41 | #include "dir.h" | ||
41 | #include "blockcheck.h" | 42 | #include "blockcheck.h" |
42 | #include "dlmglue.h" | 43 | #include "dlmglue.h" |
43 | #include "extent_map.h" | 44 | #include "extent_map.h" |
@@ -606,7 +607,7 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
606 | } | 607 | } |
607 | 608 | ||
608 | handle = ocfs2_start_trans(osb, OCFS2_DELETE_INODE_CREDITS + | 609 | handle = ocfs2_start_trans(osb, OCFS2_DELETE_INODE_CREDITS + |
609 | ocfs2_quota_trans_credits(inode->i_sb)); | 610 | ocfs2_quota_trans_credits(inode->i_sb)); |
610 | if (IS_ERR(handle)) { | 611 | if (IS_ERR(handle)) { |
611 | status = PTR_ERR(handle); | 612 | status = PTR_ERR(handle); |
612 | mlog_errno(status); | 613 | mlog_errno(status); |
@@ -740,6 +741,15 @@ static int ocfs2_wipe_inode(struct inode *inode, | |||
740 | goto bail_unlock_dir; | 741 | goto bail_unlock_dir; |
741 | } | 742 | } |
742 | 743 | ||
744 | /* Remove any dir index tree */ | ||
745 | if (S_ISDIR(inode->i_mode)) { | ||
746 | status = ocfs2_dx_dir_truncate(inode, di_bh); | ||
747 | if (status) { | ||
748 | mlog_errno(status); | ||
749 | goto bail_unlock_dir; | ||
750 | } | ||
751 | } | ||
752 | |||
743 | /*Free extended attribute resources associated with this inode.*/ | 753 | /*Free extended attribute resources associated with this inode.*/ |
744 | status = ocfs2_xattr_remove(inode, di_bh); | 754 | status = ocfs2_xattr_remove(inode, di_bh); |
745 | if (status < 0) { | 755 | if (status < 0) { |