diff options
Diffstat (limited to 'fs/ufs/super.c')
-rw-r--r-- | fs/ufs/super.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c index d4aacee593ff..e9055ef7f5ac 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c | |||
@@ -388,7 +388,8 @@ static int ufs_parse_options (char * options, unsigned * mount_options) | |||
388 | /* | 388 | /* |
389 | * Read on-disk structures associated with cylinder groups | 389 | * Read on-disk structures associated with cylinder groups |
390 | */ | 390 | */ |
391 | static int ufs_read_cylinder_structures (struct super_block *sb) { | 391 | static int ufs_read_cylinder_structures (struct super_block *sb) |
392 | { | ||
392 | struct ufs_sb_info * sbi = UFS_SB(sb); | 393 | struct ufs_sb_info * sbi = UFS_SB(sb); |
393 | struct ufs_sb_private_info * uspi; | 394 | struct ufs_sb_private_info * uspi; |
394 | struct ufs_super_block *usb; | 395 | struct ufs_super_block *usb; |
@@ -415,6 +416,7 @@ static int ufs_read_cylinder_structures (struct super_block *sb) { | |||
415 | base = space = kmalloc(size, GFP_KERNEL); | 416 | base = space = kmalloc(size, GFP_KERNEL); |
416 | if (!base) | 417 | if (!base) |
417 | goto failed; | 418 | goto failed; |
419 | sbi->s_csp = (struct ufs_csum *)space; | ||
418 | for (i = 0; i < blks; i += uspi->s_fpb) { | 420 | for (i = 0; i < blks; i += uspi->s_fpb) { |
419 | size = uspi->s_bsize; | 421 | size = uspi->s_bsize; |
420 | if (i + uspi->s_fpb > blks) | 422 | if (i + uspi->s_fpb > blks) |
@@ -430,7 +432,6 @@ static int ufs_read_cylinder_structures (struct super_block *sb) { | |||
430 | goto failed; | 432 | goto failed; |
431 | 433 | ||
432 | ubh_ubhcpymem (space, ubh, size); | 434 | ubh_ubhcpymem (space, ubh, size); |
433 | sbi->s_csp[ufs_fragstoblks(i)]=(struct ufs_csum *)space; | ||
434 | 435 | ||
435 | space += size; | 436 | space += size; |
436 | ubh_brelse (ubh); | 437 | ubh_brelse (ubh); |
@@ -486,7 +487,8 @@ failed: | |||
486 | * Put on-disk structures associated with cylinder groups and | 487 | * Put on-disk structures associated with cylinder groups and |
487 | * write them back to disk | 488 | * write them back to disk |
488 | */ | 489 | */ |
489 | static void ufs_put_cylinder_structures (struct super_block *sb) { | 490 | static void ufs_put_cylinder_structures (struct super_block *sb) |
491 | { | ||
490 | struct ufs_sb_info * sbi = UFS_SB(sb); | 492 | struct ufs_sb_info * sbi = UFS_SB(sb); |
491 | struct ufs_sb_private_info * uspi; | 493 | struct ufs_sb_private_info * uspi; |
492 | struct ufs_buffer_head * ubh; | 494 | struct ufs_buffer_head * ubh; |
@@ -499,7 +501,7 @@ static void ufs_put_cylinder_structures (struct super_block *sb) { | |||
499 | 501 | ||
500 | size = uspi->s_cssize; | 502 | size = uspi->s_cssize; |
501 | blks = (size + uspi->s_fsize - 1) >> uspi->s_fshift; | 503 | blks = (size + uspi->s_fsize - 1) >> uspi->s_fshift; |
502 | base = space = (char*) sbi->s_csp[0]; | 504 | base = space = (char*) sbi->s_csp; |
503 | for (i = 0; i < blks; i += uspi->s_fpb) { | 505 | for (i = 0; i < blks; i += uspi->s_fpb) { |
504 | size = uspi->s_bsize; | 506 | size = uspi->s_bsize; |
505 | if (i + uspi->s_fpb > blks) | 507 | if (i + uspi->s_fpb > blks) |