X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fcobd%2Flproc_cache.c;h=fd7474b9dd650d14f8abc7e896515c9f926cbebf;hp=7e5c2670c0a7df9243e861a7b24f6e48a9215b68;hb=96ec6856f91f7f9031cfce4273c714d72cfe59ae;hpb=0bcac33c5aec463e9f471fba6f7d0adc26e6df9f diff --git a/lustre/cobd/lproc_cache.c b/lustre/cobd/lproc_cache.c index 7e5c267..fd7474b 100644 --- a/lustre/cobd/lproc_cache.c +++ b/lustre/cobd/lproc_cache.c @@ -40,13 +40,14 @@ static int rd_target(char *page, char **start, off_t off, int count, LASSERT(dev != NULL); conn = &dev->u.cobd.cobd_target; - if ((dev->obd_flags & OBD_SET_UP) == 0) + if (!dev->obd_set_up) { rc = snprintf (page, count, "not set up\n"); - else { - exp = class_conn2export (conn); + } else { + exp = class_conn2export(conn); LASSERT(exp != NULL); rc = snprintf(page, count, "%s\n", exp->exp_obd->obd_uuid.uuid); + class_export_put(exp); } return (rc); } @@ -62,13 +63,14 @@ static int rd_cache(char *page, char **start, off_t off, int count, LASSERT(dev != NULL); conn = &dev->u.cobd.cobd_cache; - if ((dev->obd_flags & OBD_SET_UP) == 0) + if (!dev->obd_set_up) { rc = snprintf (page, count, "not set up\n"); - else { - exp = class_conn2export (conn); + } else { + exp = class_conn2export(conn); LASSERT (exp != NULL); rc = snprintf(page, count, "%s\n", exp->exp_obd->obd_uuid.uuid); + class_export_put(exp); } return (rc); }