From 2da561166d9b00c46fa82aacfb27adb503522550 Mon Sep 17 00:00:00 2001 From: Goldwyn Rodrigues Date: Mon, 11 Oct 2010 12:57:09 -0500 Subject: [PATCH] --- yaml --- r: 212777 b: refs/heads/master c: 75d9bbc73804285020aa4d99bd2a9600edea8945 h: refs/heads/master i: 212775: f849be952e6edb9736cc24371117bee4b1627bba v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/super.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 882d71bfed07..751ffe7c6aab 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f30d44f3e54a94e037da7a71d714b585dab28d9e +refs/heads/master: 75d9bbc73804285020aa4d99bd2a9600edea8945 diff --git a/trunk/fs/ocfs2/super.c b/trunk/fs/ocfs2/super.c index 350e8b5a9396..b578644b6637 100644 --- a/trunk/fs/ocfs2/super.c +++ b/trunk/fs/ocfs2/super.c @@ -2105,6 +2105,15 @@ static int ocfs2_initialize_super(struct super_block *sb, snprintf(osb->dev_str, sizeof(osb->dev_str), "%u,%u", MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev)); + osb->max_slots = le16_to_cpu(di->id2.i_super.s_max_slots); + if (osb->max_slots > OCFS2_MAX_SLOTS || osb->max_slots == 0) { + mlog(ML_ERROR, "Invalid number of node slots (%u)\n", + osb->max_slots); + status = -EINVAL; + goto bail; + } + mlog(0, "max_slots for this device: %u\n", osb->max_slots); + ocfs2_orphan_scan_init(osb); status = ocfs2_recovery_init(osb); @@ -2143,15 +2152,6 @@ static int ocfs2_initialize_super(struct super_block *sb, goto bail; } - osb->max_slots = le16_to_cpu(di->id2.i_super.s_max_slots); - if (osb->max_slots > OCFS2_MAX_SLOTS || osb->max_slots == 0) { - mlog(ML_ERROR, "Invalid number of node slots (%u)\n", - osb->max_slots); - status = -EINVAL; - goto bail; - } - mlog(0, "max_slots for this device: %u\n", osb->max_slots); - osb->slot_recovery_generations = kcalloc(osb->max_slots, sizeof(*osb->slot_recovery_generations), GFP_KERNEL);