X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmgc%2Fmgc_request.c;h=411909f10c72557c052a224f6464369c0f9ef608;hp=4550de575a0b41bc7fd78c16dbf37d64bf20b5e1;hb=7bf1d7c6cb7d0a7231b3fdcb9e3d3ec3129fb427;hpb=479a1f05063769cd16d99a94512e94c65131e6f3 diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index 4550de5..411909f 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -1592,8 +1592,9 @@ static int mgc_llog_is_empty(struct obd_device *obd, struct llog_ctxt *ctxt, push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); rc = llog_open(NULL, ctxt, &llh, NULL, name, LLOG_OPEN_EXISTS); if (rc == 0) { - llog_init_handle(NULL, llh, LLOG_F_IS_PLAIN, NULL); - rc = llog_get_size(llh); + rc = llog_init_handle(NULL, llh, LLOG_F_IS_PLAIN, NULL); + if (rc == 0) + rc = llog_get_size(llh); llog_close(NULL, llh); } else if (rc == -ENOENT) { rc = 0;