File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -202,12 +202,8 @@ static int jffs2_parse_param(struct fs_context *fc, struct fs_parameter *param)
202202 case Opt_rp_size :
203203 if (result .uint_32 > UINT_MAX / 1024 )
204204 return invalf (fc , "jffs2: rp_size unrepresentable" );
205- opt = result .uint_32 * 1024 ;
206- if (opt > c -> mtd -> size )
207- return invalf (fc , "jffs2: Too large reserve pool specified, max is %llu KB" ,
208- c -> mtd -> size / 1024 );
205+ c -> mount_opts .rp_size = result .uint_32 * 1024 ;
209206 c -> mount_opts .set_rp_size = true;
210- c -> mount_opts .rp_size = opt ;
211207 break ;
212208 default :
213209 return - EINVAL ;
@@ -269,6 +265,10 @@ static int jffs2_fill_super(struct super_block *sb, struct fs_context *fc)
269265 c -> mtd = sb -> s_mtd ;
270266 c -> os_priv = sb ;
271267
268+ if (c -> mount_opts .rp_size > c -> mtd -> size )
269+ return invalf (fc , "jffs2: Too large reserve pool specified, max is %llu KB" ,
270+ c -> mtd -> size / 1024 );
271+
272272 /* Initialize JFFS2 superblock locks, the further initialization will
273273 * be done later */
274274 mutex_init (& c -> alloc_sem );
You can’t perform that action at this time.
0 commit comments