aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/super.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 350e8b5a9396..b578644b6637 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -2105,6 +2105,15 @@ static int ocfs2_initialize_super(struct super_block *sb,
2105 snprintf(osb->dev_str, sizeof(osb->dev_str), "%u,%u", 2105 snprintf(osb->dev_str, sizeof(osb->dev_str), "%u,%u",
2106 MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev)); 2106 MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev));
2107 2107
2108 osb->max_slots = le16_to_cpu(di->id2.i_super.s_max_slots);
2109 if (osb->max_slots > OCFS2_MAX_SLOTS || osb->max_slots == 0) {
2110 mlog(ML_ERROR, "Invalid number of node slots (%u)\n",
2111 osb->max_slots);
2112 status = -EINVAL;
2113 goto bail;
2114 }
2115 mlog(0, "max_slots for this device: %u\n", osb->max_slots);
2116
2108 ocfs2_orphan_scan_init(osb); 2117 ocfs2_orphan_scan_init(osb);
2109 2118
2110 status = ocfs2_recovery_init(osb); 2119 status = ocfs2_recovery_init(osb);
@@ -2143,15 +2152,6 @@ static int ocfs2_initialize_super(struct super_block *sb,
2143 goto bail; 2152 goto bail;
2144 } 2153 }
2145 2154
2146 osb->max_slots = le16_to_cpu(di->id2.i_super.s_max_slots);
2147 if (osb->max_slots > OCFS2_MAX_SLOTS || osb->max_slots == 0) {
2148 mlog(ML_ERROR, "Invalid number of node slots (%u)\n",
2149 osb->max_slots);
2150 status = -EINVAL;
2151 goto bail;
2152 }
2153 mlog(0, "max_slots for this device: %u\n", osb->max_slots);
2154
2155 osb->slot_recovery_generations = 2155 osb->slot_recovery_generations =
2156 kcalloc(osb->max_slots, sizeof(*osb->slot_recovery_generations), 2156 kcalloc(osb->max_slots, sizeof(*osb->slot_recovery_generations),
2157 GFP_KERNEL); 2157 GFP_KERNEL);