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 @@ -208,12 +208,8 @@ static int jffs2_parse_param(struct fs_context *fc, struct fs_parameter *param)
208208 case Opt_rp_size :
209209 if (result .uint_32 > UINT_MAX / 1024 )
210210 return invalf (fc , "jffs2: rp_size unrepresentable" );
211- opt = result .uint_32 * 1024 ;
212- if (opt > c -> mtd -> size )
213- return invalf (fc , "jffs2: Too large reserve pool specified, max is %llu KB" ,
214- c -> mtd -> size / 1024 );
211+ c -> mount_opts .rp_size = result .uint_32 * 1024 ;
215212 c -> mount_opts .set_rp_size = true;
216- c -> mount_opts .rp_size = opt ;
217213 break ;
218214 default :
219215 return - EINVAL ;
@@ -275,6 +271,10 @@ static int jffs2_fill_super(struct super_block *sb, struct fs_context *fc)
275271 c -> mtd = sb -> s_mtd ;
276272 c -> os_priv = sb ;
277273
274+ if (c -> mount_opts .rp_size > c -> mtd -> size )
275+ return invalf (fc , "jffs2: Too large reserve pool specified, max is %llu KB" ,
276+ c -> mtd -> size / 1024 );
277+
278278 /* Initialize JFFS2 superblock locks, the further initialization will
279279 * be done later */
280280 mutex_init (& c -> alloc_sem );
You can’t perform that action at this time.
0 commit comments