File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -187,10 +187,15 @@ static int squashfs_fill_super(struct super_block *sb, struct fs_context *fc)
187
187
unsigned short flags ;
188
188
unsigned int fragments ;
189
189
u64 lookup_table_start , xattr_id_table_start , next_table ;
190
- int err ;
190
+ int err , devblksize = sb_min_blocksize ( sb , SQUASHFS_DEVBLK_SIZE ) ;
191
191
192
192
TRACE ("Entered squashfs_fill_superblock\n" );
193
193
194
+ if (!devblksize ) {
195
+ errorf (fc , "squashfs: unable to set blocksize\n" );
196
+ return - EINVAL ;
197
+ }
198
+
194
199
sb -> s_fs_info = kzalloc (sizeof (* msblk ), GFP_KERNEL );
195
200
if (sb -> s_fs_info == NULL ) {
196
201
ERROR ("Failed to allocate squashfs_sb_info\n" );
@@ -201,12 +206,7 @@ static int squashfs_fill_super(struct super_block *sb, struct fs_context *fc)
201
206
202
207
msblk -> panic_on_errors = (opts -> errors == Opt_errors_panic );
203
208
204
- msblk -> devblksize = sb_min_blocksize (sb , SQUASHFS_DEVBLK_SIZE );
205
- if (!msblk -> devblksize ) {
206
- errorf (fc , "squashfs: unable to set blocksize\n" );
207
- return - EINVAL ;
208
- }
209
-
209
+ msblk -> devblksize = devblksize ;
210
210
msblk -> devblksize_log2 = ffz (~msblk -> devblksize );
211
211
212
212
mutex_init (& msblk -> meta_index_mutex );
You can’t perform that action at this time.
0 commit comments