File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ static int simplefs_write_end(struct file *file,
218218 /* Read ei_block to remove unused blocks */
219219 bh_index = sb_bread (sb , ci -> ei_block );
220220 if (!bh_index ) {
221- pr_err ("failed truncating '%s'. we just lost %llu blocks\n" ,
221+ pr_err ("Failed to truncate '%s'. Lost %llu blocks\n" ,
222222 file -> f_path .dentry -> d_name .name ,
223223 nr_blocks_old - inode -> i_blocks );
224224 goto end ;
Original file line number Diff line number Diff line change @@ -43,26 +43,30 @@ static int __init simplefs_init(void)
4343{
4444 int ret = simplefs_init_inode_cache ();
4545 if (ret ) {
46- pr_err ("inode cache creation failed \n" );
47- goto end ;
46+ pr_err ("Failed to create inode cache \n" );
47+ goto err ;
4848 }
4949
5050 ret = register_filesystem (& simplefs_file_system_type );
5151 if (ret ) {
52- pr_err ("register_filesystem() failed \n" );
53- goto end ;
52+ pr_err ("Failed to register file system \n" );
53+ goto err_inode ;
5454 }
5555
5656 pr_info ("module loaded\n" );
57- end :
57+ return 0 ;
58+
59+ err_inode :
60+ simplefs_destroy_inode_cache ();
61+ err :
5862 return ret ;
5963}
6064
6165static void __exit simplefs_exit (void )
6266{
6367 int ret = unregister_filesystem (& simplefs_file_system_type );
6468 if (ret )
65- pr_err ("unregister_filesystem() failed \n" );
69+ pr_err ("Failed to unregister file system \n" );
6670
6771 simplefs_destroy_inode_cache ();
6872
You can’t perform that action at this time.
0 commit comments