diff options
author | Tao Ma <tao.ma@oracle.com> | 2009-08-18 11:43:49 +0800 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-09-22 20:09:44 -0700 |
commit | 8b2c0dba5159570af5721d40490f6c529d721500 (patch) | |
tree | faca76fab3c9a65ba8e7be3aa93d02e4ff53f0cf /fs/ocfs2/inode.c | |
parent | 0129241e2b3b90ff83a8c774353e5612d84bd493 (diff) | |
download | linux-8b2c0dba5159570af5721d40490f6c529d721500.tar.gz linux-8b2c0dba5159570af5721d40490f6c529d721500.tar.bz2 linux-8b2c0dba5159570af5721d40490f6c529d721500.zip |
ocfs2: Call refcount tree remove process properly.
Now with xattr refcount support, we need to check whether
we have xattr refcounted before we remove the refcount tree.
Now the mechanism is:
1) Check whether i_clusters == 0, if no, exit.
2) check whether we have i_xattr_loc in dinode. if yes, exit.
2) Check whether we have inline xattr stored outside, if yes, exit.
4) Remove the tree.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Diffstat (limited to 'fs/ocfs2/inode.c')
-rw-r--r-- | fs/ocfs2/inode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index e82ceb31cc83..0297fb8982b8 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -53,6 +53,7 @@ #include "sysfile.h" #include "uptodate.h" #include "xattr.h" +#include "refcounttree.h" #include "buffer_head_io.h" @@ -782,6 +783,12 @@ static int ocfs2_wipe_inode(struct inode *inode, goto bail_unlock_dir; } + status = ocfs2_remove_refcount_tree(inode, di_bh); + if (status < 0) { + mlog_errno(status); + goto bail_unlock_dir; + } + status = ocfs2_remove_inode(inode, di_bh, orphan_dir_inode, orphan_dir_bh); if (status < 0) |