Whamcloud - gitweb
LU-6142 lustre: remove non-static 'inline' markings. 89/40289/4
authorMr NeilBrown <neilb@suse.de>
Thu, 15 Oct 2020 00:10:47 +0000 (11:10 +1100)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 21:43:28 +0000 (21:43 +0000)
There is rarely any point in marking a non-static function as
'inline'.  The result is to compile a state-alone function that other
files can refer to, and also to inline the code where it is used in
the same file.

In many cases the non-static inline functions are not used in the same
file, so the 'inline' marking has no effect.  In other cases it may
have an effect, but it can only be needed in highly performance
critical situations where a function call must be avoided, and that
doesn't seem like in any of these cases.

So just remove the "inline".

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ic3243ee80f9bfd75a67dd8c89ea07d08dc36425c
Reviewed-on: https://review.whamcloud.com/40289
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
libcfs/libcfs/crypto/keysetup.c
lnet/lnet/router.c
lustre/llite/crypto.c
lustre/lod/lod_object.c
lustre/quota/qmt_entry.c
lustre/quota/qmt_pool.c
lustre/utils/lfs_project.c

index 2d35266..aa793df 100644 (file)
@@ -617,7 +617,7 @@ int llcrypt_drop_inode(struct inode *inode)
 }
 EXPORT_SYMBOL_GPL(llcrypt_drop_inode);
 
-inline bool llcrypt_has_encryption_key(const struct inode *inode)
+bool llcrypt_has_encryption_key(const struct inode *inode)
 {
        /* pairs with cmpxchg_release() in llcrypt_get_encryption_info() */
        return READ_ONCE(llcrypt_info_nocast(inode)) != NULL;
index 33b4a17..acddc75 100644 (file)
@@ -1128,8 +1128,7 @@ void lnet_wait_router_start(void)
  * This function is called from the monitor thread to check if there are
  * any active routers that need to be checked.
  */
-inline bool
-lnet_router_checker_active(void)
+bool lnet_router_checker_active(void)
 {
        /* Router Checker thread needs to run when routing is enabled in
         * order to call lnet_update_ni_status_locked() */
index 7e32fa4..764c9ed 100644 (file)
@@ -113,13 +113,13 @@ static int ll_set_context(struct inode *inode, const void *ctx, size_t len,
        return ll_set_encflags(inode, (void *)ctx, len, false);
 }
 
-inline void llcrypt_free_ctx(void *encctx, __u32 size)
+void llcrypt_free_ctx(void *encctx, __u32 size)
 {
        if (encctx)
                OBD_FREE(encctx, size);
 }
 
-inline bool ll_sbi_has_test_dummy_encryption(struct ll_sb_info *sbi)
+bool ll_sbi_has_test_dummy_encryption(struct ll_sb_info *sbi)
 {
        return unlikely(sbi->ll_flags & LL_SBI_TEST_DUMMY_ENCRYPTION);
 }
@@ -131,12 +131,12 @@ static bool ll_dummy_context(struct inode *inode)
        return sbi ? ll_sbi_has_test_dummy_encryption(sbi) : false;
 }
 
-inline bool ll_sbi_has_encrypt(struct ll_sb_info *sbi)
+bool ll_sbi_has_encrypt(struct ll_sb_info *sbi)
 {
        return sbi->ll_flags & LL_SBI_ENCRYPT;
 }
 
-inline void ll_sbi_set_encrypt(struct ll_sb_info *sbi, bool set)
+void ll_sbi_set_encrypt(struct ll_sb_info *sbi, bool set)
 {
        if (set)
                sbi->ll_flags |= LL_SBI_ENCRYPT;
@@ -172,21 +172,21 @@ int ll_set_encflags(struct inode *inode, void *encctx, __u32 encctxlen,
        return 0;
 }
 
-inline void llcrypt_free_ctx(void *encctx, __u32 size)
+void llcrypt_free_ctx(void *encctx, __u32 size)
 {
 }
 
-inline bool ll_sbi_has_test_dummy_encryption(struct ll_sb_info *sbi)
+bool ll_sbi_has_test_dummy_encryption(struct ll_sb_info *sbi)
 {
        return false;
 }
 
-inline bool ll_sbi_has_encrypt(struct ll_sb_info *sbi)
+bool ll_sbi_has_encrypt(struct ll_sb_info *sbi)
 {
        return false;
 }
 
-inline void ll_sbi_set_encrypt(struct ll_sb_info *sbi, bool set)
+void ll_sbi_set_encrypt(struct ll_sb_info *sbi, bool set)
 {
 }
 #endif
index 9165fe2..660dac0 100644 (file)
@@ -2636,8 +2636,8 @@ static int lod_replace_parent_fid(const struct lu_env *env,
        RETURN(rc);
 }
 
-inline __u16 lod_comp_entry_stripe_count(struct lod_object *lo,
-                                        int comp_idx, bool is_dir)
+__u16 lod_comp_entry_stripe_count(struct lod_object *lo,
+                                 int comp_idx, bool is_dir)
 {
        struct lod_device *lod = lu2lod_dev(lod2lu_obj(lo)->lo_dev);
        struct lod_layout_component *entry;
index f5b74de..a1eb9c7 100644 (file)
@@ -944,7 +944,7 @@ void qti_lqes_fini(const struct lu_env *env)
                         qti->qti_lqes_num * sizeof(struct lquota_entry *));
 }
 
-inline int qti_lqes_min_qunit(const struct lu_env *env)
+int qti_lqes_min_qunit(const struct lu_env *env)
 {
        int i, min, qunit;
 
@@ -957,7 +957,7 @@ inline int qti_lqes_min_qunit(const struct lu_env *env)
        return min;
 }
 
-inline int qti_lqes_edquot(const struct lu_env *env)
+int qti_lqes_edquot(const struct lu_env *env)
 {
        int i;
 
@@ -969,7 +969,7 @@ inline int qti_lqes_edquot(const struct lu_env *env)
        return 0;
 }
 
-inline int qti_lqes_restore_init(const struct lu_env *env)
+int qti_lqes_restore_init(const struct lu_env *env)
 {
        int rc = 0;
 
@@ -983,14 +983,14 @@ inline int qti_lqes_restore_init(const struct lu_env *env)
        return rc;
 }
 
-inline void qti_lqes_restore_fini(const struct lu_env *env)
+void qti_lqes_restore_fini(const struct lu_env *env)
 {
        if (qti_lqes_cnt(env) > QMT_MAX_POOL_NUM)
                OBD_FREE(qmt_info(env)->qti_lqes_rstr,
                         qti_lqes_cnt(env) * sizeof(struct qmt_lqe_restore));
 }
 
-inline void qti_lqes_write_lock(const struct lu_env *env)
+void qti_lqes_write_lock(const struct lu_env *env)
 {
        int i;
 
@@ -998,7 +998,7 @@ inline void qti_lqes_write_lock(const struct lu_env *env)
                lqe_write_lock(qti_lqes(env)[i]);
 }
 
-inline void qti_lqes_write_unlock(const struct lu_env *env)
+void qti_lqes_write_unlock(const struct lu_env *env)
 {
        int i;
 
index 9f7563c..af0709c 100644 (file)
@@ -1564,7 +1564,7 @@ static inline int qmt_sarr_check_idx(struct qmt_pool_info *qpi, int idx)
        }
 }
 
-inline struct rw_semaphore *qmt_sarr_rwsem(struct qmt_pool_info *qpi)
+struct rw_semaphore *qmt_sarr_rwsem(struct qmt_pool_info *qpi)
 {
        switch (qpi->qpi_rtype) {
        case LQUOTA_RES_DT:
@@ -1576,7 +1576,7 @@ inline struct rw_semaphore *qmt_sarr_rwsem(struct qmt_pool_info *qpi)
        }
 }
 
-inline int qmt_sarr_get_idx(struct qmt_pool_info *qpi, int arr_idx)
+int qmt_sarr_get_idx(struct qmt_pool_info *qpi, int arr_idx)
 {
 
        if (qmt_pool_global(qpi))
@@ -1595,7 +1595,7 @@ inline int qmt_sarr_get_idx(struct qmt_pool_info *qpi, int arr_idx)
 }
 
 /* Number of slaves in a pool */
-inline unsigned int qmt_sarr_count(struct qmt_pool_info *qpi)
+unsigned int qmt_sarr_count(struct qmt_pool_info *qpi)
 {
        switch (qpi->qpi_rtype) {
        case LQUOTA_RES_DT:
index 9f82b74..d8b1500 100644 (file)
@@ -341,26 +341,26 @@ static int lfs_project_iterate(const char *pathname,
 }
 
 
-inline int lfs_project_check(const char *pathname,
-                            struct project_handle_control *phc)
+int lfs_project_check(const char *pathname,
+                     struct project_handle_control *phc)
 {
        return lfs_project_iterate(pathname, phc, project_check_one);
 }
 
-inline int lfs_project_clear(const char *pathname,
-                            struct project_handle_control *phc)
+int lfs_project_clear(const char *pathname,
+                     struct project_handle_control *phc)
 {
        return lfs_project_iterate(pathname, phc, project_clear_one);
 }
 
-inline int lfs_project_set(const char *pathname,
-                          struct project_handle_control *phc)
+int lfs_project_set(const char *pathname,
+                   struct project_handle_control *phc)
 {
        return lfs_project_iterate(pathname, phc, project_set_one);
 }
 
-inline int lfs_project_list(const char *pathname,
-                           struct project_handle_control *phc)
+int lfs_project_list(const char *pathname,
+                    struct project_handle_control *phc)
 {
        return lfs_project_iterate(pathname, phc, project_list_one);
 }