]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ocfs2: Reserve 1 more cluster in expanding_inline_dir for indexed dir.
authorTao Ma <tao.ma@oracle.com>
Mon, 6 Apr 2009 23:40:57 +0000 (07:40 +0800)
committerMark Fasheh <mfasheh@suse.com>
Tue, 7 Apr 2009 16:40:17 +0000 (09:40 -0700)
In ocfs2_expand_inline_dir, we calculate whether we need 1 extra
cluster if we can't store the dx inline the root and save it in
dx_alloc. So add it when we call ocfs2_reserve_clusters.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/dir.c

index e71160cda1100a1d5b9c840fbbbe784058a682fe..07d89204f0d33d8c4078ac4ec458e26768e2eba8 100644 (file)
@@ -2934,7 +2934,7 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh,
         */
        BUG_ON(alloc > 2);
 
-       ret = ocfs2_reserve_clusters(osb, alloc, &data_ac);
+       ret = ocfs2_reserve_clusters(osb, alloc + dx_alloc, &data_ac);
        if (ret) {
                mlog_errno(ret);
                goto out;