Commit 035a5711 authored by Tao Ma's avatar Tao Ma Committed by Mark Fasheh

ocfs2: Reserve 1 more cluster in expanding_inline_dir for indexed dir.

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: default avatarTao Ma <tao.ma@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent 61239230
...@@ -2934,7 +2934,7 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh, ...@@ -2934,7 +2934,7 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh,
*/ */
BUG_ON(alloc > 2); BUG_ON(alloc > 2);
ret = ocfs2_reserve_clusters(osb, alloc, &data_ac); ret = ocfs2_reserve_clusters(osb, alloc + dx_alloc, &data_ac);
if (ret) { if (ret) {
mlog_errno(ret); mlog_errno(ret);
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment