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)
202
202
case Opt_rp_size :
203
203
if (result .uint_32 > UINT_MAX / 1024 )
204
204
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 ;
209
206
c -> mount_opts .set_rp_size = true;
210
- c -> mount_opts .rp_size = opt ;
211
207
break ;
212
208
default :
213
209
return - EINVAL ;
@@ -269,6 +265,10 @@ static int jffs2_fill_super(struct super_block *sb, struct fs_context *fc)
269
265
c -> mtd = sb -> s_mtd ;
270
266
c -> os_priv = sb ;
271
267
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
+
272
272
/* Initialize JFFS2 superblock locks, the further initialization will
273
273
* be done later */
274
274
mutex_init (& c -> alloc_sem );
You can’t perform that action at this time.
0 commit comments