From: nikita Date: Sat, 18 Oct 2008 17:12:24 +0000 (+0000) Subject: Constify instances of struct lsm_operations. X-Git-Tag: v1_9_90~65 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=0e531fd8833e5cddb1fcbbc9bfa76a50aa01b67f;p=fs%2Flustre-release.git Constify instances of struct lsm_operations. b=16450 --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index e601ff3..ba62a48 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -1585,7 +1585,12 @@ Severity : minor Bugzilla : 16450 Description: Add loi_kms_set(). Details : Wrap kms updates into a helper function. - + +Severity : minor +Bugzilla : 16450 +Description: Constify instances of struct lsm_operations. +Details : Constify instances of struct lsm_operations. + -------------------------------------------------------------------------------- 2007-08-10 Cluster File Systems, Inc. diff --git a/lustre/include/obd.h b/lustre/include/obd.h index cef96db..ebddaa2 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -1574,10 +1574,10 @@ struct lsm_operations { struct lov_mds_md *lmm); }; -extern struct lsm_operations lsm_v1_ops; -extern struct lsm_operations lsm_join_ops; -extern struct lsm_operations lsm_v3_ops; -static inline struct lsm_operations *lsm_op_find(int magic) +extern const struct lsm_operations lsm_v1_ops; +extern const struct lsm_operations lsm_join_ops; +extern const struct lsm_operations lsm_v3_ops; +static inline const struct lsm_operations *lsm_op_find(int magic) { switch(magic) { case LOV_MAGIC_V1: diff --git a/lustre/lov/lov_ea.c b/lustre/lov/lov_ea.c index f403660..457d9dc 100755 --- a/lustre/lov/lov_ea.c +++ b/lustre/lov/lov_ea.c @@ -255,7 +255,7 @@ int lsm_unpackmd_v1(struct lov_obd *lov, struct lov_stripe_md *lsm, return 0; } -struct lsm_operations lsm_v1_ops = { +const struct lsm_operations lsm_v1_ops = { .lsm_free = lsm_free_plain, .lsm_destroy = lsm_destroy_plain, .lsm_stripe_by_index = lsm_stripe_by_index_plain, @@ -619,7 +619,7 @@ out: RETURN(rc); } -struct lsm_operations lsm_join_ops = { +const struct lsm_operations lsm_join_ops = { .lsm_free = lsm_free_join, .lsm_destroy = lsm_destroy_join, .lsm_stripe_by_index = lsm_stripe_by_index_join, @@ -694,7 +694,7 @@ int lsm_unpackmd_v3(struct lov_obd *lov, struct lov_stripe_md *lsm, return 0; } -struct lsm_operations lsm_v3_ops = { +const struct lsm_operations lsm_v3_ops = { .lsm_free = lsm_free_plain, .lsm_destroy = lsm_destroy_plain, .lsm_stripe_by_index = lsm_stripe_by_index_plain,