File tree Expand file tree Collapse file tree 6 files changed +10
-20
lines changed
Expand file tree Collapse file tree 6 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -1571,15 +1571,13 @@ static int __init ocfs2_init(void)
15711571
15721572 ocfs2_set_locking_protocol ();
15731573
1574- status = register_quota_format (& ocfs2_quota_format );
1575- if (status < 0 )
1576- goto out3 ;
1574+ register_quota_format (& ocfs2_quota_format );
1575+
15771576 status = register_filesystem (& ocfs2_fs_type );
15781577 if (!status )
15791578 return 0 ;
15801579
15811580 unregister_quota_format (& ocfs2_quota_format );
1582- out3 :
15831581 debugfs_remove (ocfs2_debugfs_root );
15841582 ocfs2_free_mem_caches ();
15851583out2 :
Original file line number Diff line number Diff line change @@ -163,13 +163,12 @@ static struct quota_module_name module_names[] = INIT_QUOTA_MODULE_NAMES;
163163/* SLAB cache for dquot structures */
164164static struct kmem_cache * dquot_cachep ;
165165
166- int register_quota_format (struct quota_format_type * fmt )
166+ void register_quota_format (struct quota_format_type * fmt )
167167{
168168 spin_lock (& dq_list_lock );
169169 fmt -> qf_next = quota_formats ;
170170 quota_formats = fmt ;
171171 spin_unlock (& dq_list_lock );
172- return 0 ;
173172}
174173EXPORT_SYMBOL (register_quota_format );
175174
Original file line number Diff line number Diff line change @@ -235,7 +235,8 @@ static struct quota_format_type v1_quota_format = {
235235
236236static int __init init_v1_quota_format (void )
237237{
238- return register_quota_format (& v1_quota_format );
238+ register_quota_format (& v1_quota_format );
239+ return 0 ;
239240}
240241
241242static void __exit exit_v1_quota_format (void )
Original file line number Diff line number Diff line change @@ -440,12 +440,9 @@ static struct quota_format_type v2r1_quota_format = {
440440
441441static int __init init_v2_quota_format (void )
442442{
443- int ret ;
444-
445- ret = register_quota_format (& v2r0_quota_format );
446- if (ret )
447- return ret ;
448- return register_quota_format (& v2r1_quota_format );
443+ register_quota_format (& v2r0_quota_format );
444+ register_quota_format (& v2r1_quota_format );
445+ return 0 ;
449446}
450447
451448static void __exit exit_v2_quota_format (void )
Original file line number Diff line number Diff line change @@ -526,7 +526,7 @@ struct quota_info {
526526 const struct quota_format_ops * ops [MAXQUOTAS ]; /* Operations for each type */
527527};
528528
529- int register_quota_format (struct quota_format_type * fmt );
529+ void register_quota_format (struct quota_format_type * fmt );
530530void unregister_quota_format (struct quota_format_type * fmt );
531531
532532struct quota_module_name {
Original file line number Diff line number Diff line change @@ -4818,11 +4818,7 @@ void __init shmem_init(void)
48184818 shmem_init_inodecache ();
48194819
48204820#ifdef CONFIG_TMPFS_QUOTA
4821- error = register_quota_format (& shmem_quota_format );
4822- if (error < 0 ) {
4823- pr_err ("Could not register quota format\n" );
4824- goto out3 ;
4825- }
4821+ register_quota_format (& shmem_quota_format );
48264822#endif
48274823
48284824 error = register_filesystem (& shmem_fs_type );
@@ -4857,7 +4853,6 @@ void __init shmem_init(void)
48574853out2 :
48584854#ifdef CONFIG_TMPFS_QUOTA
48594855 unregister_quota_format (& shmem_quota_format );
4860- out3 :
48614856#endif
48624857 shmem_destroy_inodecache ();
48634858 shm_mnt = ERR_PTR (error );
You can’t perform that action at this time.
0 commit comments