X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Flustre_export.h;h=787094c112f1cab20e4153eb58f6f7e9503fa1cb;hp=cb472811ed4ee2793f827f90bf1e0c3ef0634546;hb=ec295cad998d4d5e7fc915491da5ac646dbc6af6;hpb=8ff60aa7ec26d864eb3d260a6e27e4d2958a827a;ds=sidebyside diff --git a/lustre/include/lustre_export.h b/lustre/include/lustre_export.h index cb47281..787094c 100644 --- a/lustre/include/lustre_export.h +++ b/lustre/include/lustre_export.h @@ -126,20 +126,22 @@ struct obd_export { static inline int exp_connect_cancelset(struct obd_export *exp) { - return exp ? exp->exp_connect_flags & OBD_CONNECT_CANCELSET : 0; + return exp ? !!(exp->exp_connect_flags & OBD_CONNECT_CANCELSET) : 0; } static inline int exp_connect_lru_resize(struct obd_export *exp) { LASSERT(exp != NULL); - return exp->exp_connect_flags & OBD_CONNECT_LRU_RESIZE; + return !!(exp->exp_connect_flags & OBD_CONNECT_LRU_RESIZE); } static inline int imp_connect_lru_resize(struct obd_import *imp) { + struct obd_connect_data *ocd; + LASSERT(imp != NULL); - return imp->imp_connect_data.ocd_connect_flags & - OBD_CONNECT_LRU_RESIZE; + ocd = &imp->imp_connect_data; + return !!(ocd->ocd_connect_flags & OBD_CONNECT_LRU_RESIZE); } extern struct obd_export *class_conn2export(struct lustre_handle *conn);