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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Saturday, May 2, 2009 - 5:00 pm

Gitweb:     http://git.kernel.org/linus/035a571120ddbe4f92b91bbe46f3eff05b6e43eb
Commit:     035a571120ddbe4f92b91bbe46f3eff05b6e43eb
Parent:     612392307cb09e49051225092cbbd7049bd8db93
Author:     Tao Ma <tao.ma@oracle.com>
AuthorDate: Tue Apr 7 07:40:57 2009 +0800
Committer:  Mark Fasheh <mfasheh@suse.com>
CommitDate: Tue Apr 7 09:40:17 2009 -0700

    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: Tao Ma <tao.ma@oracle.com>
    Signed-off-by: Mark Fasheh <mfasheh@suse.com>
---
 fs/ocfs2/dir.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index e71160c..07d8920 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -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;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ocfs2: Reserve 1 more cluster in expanding_inline_dir for ..., Linux Kernel Mailing ..., (Sat May 2, 5:00 pm)