ocfs2: Call refcount tree remove process properly.
authorTao Ma <tao.ma@oracle.com>
Tue, 18 Aug 2009 03:43:49 +0000 (11:43 +0800)
committerJoel Becker <joel.becker@oracle.com>
Wed, 23 Sep 2009 03:09:44 +0000 (20:09 -0700)
commit8b2c0dba5159570af5721d40490f6c529d721500
treefaca76fab3c9a65ba8e7be3aa93d02e4ff53f0cf
parent0129241e2b3b90ff83a8c774353e5612d84bd493
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>
fs/ocfs2/file.c
fs/ocfs2/inode.c
fs/ocfs2/refcounttree.c
fs/ocfs2/refcounttree.h
fs/ocfs2/xattr.c
fs/ocfs2/xattr.h