]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ocfs2: change return type of ocfs2_resmap_init
authorHeming Zhao via Ocfs2-devel <ocfs2-devel@oss.oracle.com>
Fri, 29 Apr 2022 21:37:58 +0000 (14:37 -0700)
committerakpm <akpm@linux-foundation.org>
Fri, 29 Apr 2022 21:37:58 +0000 (14:37 -0700)
Since ocfs2_resmap_init() always return 0, change it to void.

Link: https://lkml.kernel.org/r/20220424130952.2436-3-heming.zhao@suse.com
Signed-off-by: Heming Zhao <heming.zhao@suse.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Jun Piao <piaojun@huawei.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Mark Fasheh <mark@fasheh.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/reservations.c
fs/ocfs2/reservations.h
fs/ocfs2/super.c

index 769e466887b08211f1f9c04ecf9ed19eb8280347..a9d1296d736dc4dd4ab9b40ad6eadc3af6d52788 100644 (file)
@@ -198,7 +198,7 @@ void ocfs2_resv_set_type(struct ocfs2_alloc_reservation *resv,
        resv->r_flags |= flags;
 }
 
-int ocfs2_resmap_init(struct ocfs2_super *osb,
+void ocfs2_resmap_init(struct ocfs2_super *osb,
                      struct ocfs2_reservation_map *resmap)
 {
        memset(resmap, 0, sizeof(*resmap));
@@ -207,8 +207,6 @@ int ocfs2_resmap_init(struct ocfs2_super *osb,
        resmap->m_reservations = RB_ROOT;
        /* m_bitmap_len is initialized to zero by the above memset. */
        INIT_LIST_HEAD(&resmap->m_lru);
-
-       return 0;
 }
 
 static void ocfs2_resv_mark_lru(struct ocfs2_reservation_map *resmap,
index 677c50663595e3935e0bca06647bba51fcf32b3f..ec8101ef57179e9bb4932d8995b3fb847504f2f2 100644 (file)
@@ -73,15 +73,10 @@ void ocfs2_resv_discard(struct ocfs2_reservation_map *resmap,
 
 /**
  * ocfs2_resmap_init() - Initialize fields of a reservations bitmap
+ * @osb: struct ocfs2_super to be saved in resmap
  * @resmap: struct ocfs2_reservation_map to initialize
- * @obj: unused for now
- * @ops: unused for now
- * @max_bitmap_bytes: Maximum size of the bitmap (typically blocksize)
- *
- * Only possible return value other than '0' is -ENOMEM for failure to
- * allocation mirror bitmap.
  */
-int ocfs2_resmap_init(struct ocfs2_super *osb,
+void ocfs2_resmap_init(struct ocfs2_super *osb,
                      struct ocfs2_reservation_map *resmap);
 
 /**
index 311433c69a3f5667b12ba2436d9c6a1e98c0f560..8014c690ef720f7cecc1d14d4866718a060472d0 100644 (file)
@@ -2110,11 +2110,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
 
        init_waitqueue_head(&osb->osb_mount_event);
 
-       status = ocfs2_resmap_init(osb, &osb->osb_la_resmap);
-       if (status) {
-               mlog_errno(status);
-               goto bail;
-       }
+       ocfs2_resmap_init(osb, &osb->osb_la_resmap);
 
        osb->vol_label = kmalloc(OCFS2_MAX_VOL_LABEL_LEN, GFP_KERNEL);
        if (!osb->vol_label) {