Commit 7345fb75 authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman

lustre: don't leak llog handle in llog_cat_process_cb()

An early return from llog_cat_process_cb() was leaking the llog
handle. Fix this by not doing that.
Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/7847
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4054Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarjacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: default avatarMike Pershin <mike.pershin@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e93a3082
......@@ -551,9 +551,8 @@ int llog_cat_process_cb(const struct lu_env *env, struct llog_handle *cat_llh,
if (rec->lrh_index < d->lpd_startcat)
/* Skip processing of the logs until startcat */
return 0;
if (d->lpd_startidx > 0) {
rc = 0;
else if (d->lpd_startidx > 0) {
struct llog_process_cat_data cd;
cd.lpcd_first_idx = d->lpd_startidx;
......@@ -566,6 +565,7 @@ int llog_cat_process_cb(const struct lu_env *env, struct llog_handle *cat_llh,
rc = llog_process_or_fork(env, llh, d->lpd_cb, d->lpd_data,
NULL, false);
}
llog_handle_put(llh);
return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment