Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fs/jfs/super.c: remove 0 assignment to static + code clean-up

-Static values are automatically initialized to NULL
-Coalesce format fragments
-Remove unnecessary {}
-Small typo fixes
-Fix lines > 80 characters

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>

authored by

Fabian Frederick and committed by
Dave Kleikamp
789602e9 bc4e6b28

+19 -26
+19 -26
fs/jfs/super.c
··· 50 50 MODULE_AUTHOR("Steve Best/Dave Kleikamp/Barry Arndt, IBM"); 51 51 MODULE_LICENSE("GPL"); 52 52 53 - static struct kmem_cache * jfs_inode_cachep; 53 + static struct kmem_cache *jfs_inode_cachep; 54 54 55 55 static const struct super_operations jfs_super_operations; 56 56 static const struct export_operations jfs_export_operations; 57 57 static struct file_system_type jfs_fs_type; 58 58 59 59 #define MAX_COMMIT_THREADS 64 60 - static int commit_threads = 0; 60 + static int commit_threads; 61 61 module_param(commit_threads, int, 0); 62 62 MODULE_PARM_DESC(commit_threads, "Number of commit threads"); 63 63 ··· 84 84 panic("JFS (device %s): panic forced after error\n", 85 85 sb->s_id); 86 86 else if (sbi->flag & JFS_ERR_REMOUNT_RO) { 87 - jfs_err("ERROR: (device %s): remounting filesystem " 88 - "as read-only\n", 87 + jfs_err("ERROR: (device %s): remounting filesystem as read-only\n", 89 88 sb->s_id); 90 89 sb->s_flags |= MS_RDONLY; 91 90 } ··· 362 363 * -> user has more control over the online trimming 363 364 */ 364 365 sbi->minblks_trim = 64; 365 - if (blk_queue_discard(q)) { 366 + if (blk_queue_discard(q)) 366 367 *flag |= JFS_DISCARD; 367 - } else { 368 - pr_err("JFS: discard option " \ 369 - "not supported on device\n"); 370 - } 368 + else 369 + pr_err("JFS: discard option not supported on device\n"); 371 370 break; 372 371 } 373 372 ··· 382 385 sbi->minblks_trim = simple_strtoull( 383 386 minblks_trim, &minblks_trim, 0); 384 387 } else { 385 - pr_err("JFS: discard option " \ 386 - "not supported on device\n"); 388 + pr_err("JFS: discard option not supported on device\n"); 387 389 } 388 390 break; 389 391 } 390 392 391 393 default: 392 - printk("jfs: Unrecognized mount option \"%s\" " 393 - " or missing value\n", p); 394 + printk("jfs: Unrecognized mount option \"%s\" or missing value\n", 395 + p); 394 396 goto cleanup; 395 397 } 396 398 } ··· 415 419 int ret; 416 420 417 421 sync_filesystem(sb); 418 - if (!parse_options(data, sb, &newLVSize, &flag)) { 422 + if (!parse_options(data, sb, &newLVSize, &flag)) 419 423 return -EINVAL; 420 - } 421 424 422 425 if (newLVSize) { 423 426 if (sb->s_flags & MS_RDONLY) { 424 - pr_err("JFS: resize requires volume" \ 425 - " to be mounted read-write\n"); 427 + pr_err("JFS: resize requires volume to be mounted read-write\n"); 426 428 return -EROFS; 427 429 } 428 430 rc = jfs_extendfs(sb, newLVSize, 0); ··· 446 452 } 447 453 if ((!(sb->s_flags & MS_RDONLY)) && (*flags & MS_RDONLY)) { 448 454 rc = dquot_suspend(sb, -1); 449 - if (rc < 0) { 455 + if (rc < 0) 450 456 return rc; 451 - } 452 457 rc = jfs_umount_rw(sb); 453 458 JFS_SBI(sb)->flag = flag; 454 459 return rc; ··· 480 487 if (!new_valid_dev(sb->s_bdev->bd_dev)) 481 488 return -EOVERFLOW; 482 489 483 - sbi = kzalloc(sizeof (struct jfs_sb_info), GFP_KERNEL); 490 + sbi = kzalloc(sizeof(struct jfs_sb_info), GFP_KERNEL); 484 491 if (!sbi) 485 492 return -ENOMEM; 486 493 ··· 541 548 542 549 rc = jfs_mount(sb); 543 550 if (rc) { 544 - if (!silent) { 551 + if (!silent) 545 552 jfs_err("jfs_mount failed w/return code = %d", rc); 546 - } 547 553 goto out_mount_failed; 548 554 } 549 555 if (sb->s_flags & MS_RDONLY) ··· 579 587 * Page cache is indexed by long. 580 588 * I would use MAX_LFS_FILESIZE, but it's only half as big 581 589 */ 582 - sb->s_maxbytes = min(((u64) PAGE_CACHE_SIZE << 32) - 1, (u64)sb->s_maxbytes); 590 + sb->s_maxbytes = min(((u64) PAGE_CACHE_SIZE << 32) - 1, 591 + (u64)sb->s_maxbytes); 583 592 #endif 584 593 sb->s_time_gran = 1; 585 594 return 0; ··· 590 597 591 598 out_no_rw: 592 599 rc = jfs_umount(sb); 593 - if (rc) { 600 + if (rc) 594 601 jfs_err("jfs_umount failed with return code %d", rc); 595 - } 596 602 out_mount_failed: 597 603 filemap_write_and_wait(sbi->direct_inode->i_mapping); 598 604 truncate_inode_pages(sbi->direct_inode->i_mapping, 0); ··· 916 924 commit_threads = MAX_COMMIT_THREADS; 917 925 918 926 for (i = 0; i < commit_threads; i++) { 919 - jfsCommitThread[i] = kthread_run(jfs_lazycommit, NULL, "jfsCommit"); 927 + jfsCommitThread[i] = kthread_run(jfs_lazycommit, NULL, 928 + "jfsCommit"); 920 929 if (IS_ERR(jfsCommitThread[i])) { 921 930 rc = PTR_ERR(jfsCommitThread[i]); 922 931 jfs_err("init_jfs_fs: fork failed w/rc = %d", rc);