diff options
author | Tao Ma <tao.ma@oracle.com> | 2010-03-22 02:20:18 -0400 |
---|---|---|
committer | Tao Ma <tao.ma@oracle.com> | 2010-03-22 02:20:18 -0400 |
commit | 74380c479ad83addeff8a172ab95f59557b5b0c3 (patch) | |
tree | 49b94f3ff48cd2ca6b53977a5e3070380ccecd6b /fs/ocfs2/suballoc.c | |
parent | af2bf0d86019e0b0306965321096f8380b7ca830 (diff) |
ocfs2: Free block to the right block group.
In case the block we are going to free is allocated from
a discontiguous block group, we have to use suballoc_loc
to be the right group.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Diffstat (limited to 'fs/ocfs2/suballoc.c')
-rw-r--r-- | fs/ocfs2/suballoc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 6f39da4a9a10..0c08353fddac 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -2349,6 +2349,8 @@ int ocfs2_free_dinode(handle_t *handle, | |||
2349 | u16 bit = le16_to_cpu(di->i_suballoc_bit); | 2349 | u16 bit = le16_to_cpu(di->i_suballoc_bit); |
2350 | u64 bg_blkno = ocfs2_which_suballoc_group(blk, bit); | 2350 | u64 bg_blkno = ocfs2_which_suballoc_group(blk, bit); |
2351 | 2351 | ||
2352 | if (di->i_suballoc_loc) | ||
2353 | bg_blkno = le64_to_cpu(di->i_suballoc_loc); | ||
2352 | return ocfs2_free_suballoc_bits(handle, inode_alloc_inode, | 2354 | return ocfs2_free_suballoc_bits(handle, inode_alloc_inode, |
2353 | inode_alloc_bh, bit, bg_blkno, 1); | 2355 | inode_alloc_bh, bit, bg_blkno, 1); |
2354 | } | 2356 | } |