Skip to content

Commit

Permalink
lustre: don't leak llog handle in llog_cat_process_cb()
Browse files Browse the repository at this point in the history
An early return from llog_cat_process_cb() was leaking the llog
handle. Fix this by not doing that.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/7847
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4054
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
John L. Hammond authored and Greg Kroah-Hartman committed Feb 11, 2014
1 parent e93a308 commit 7345fb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/lustre/lustre/obdclass/llog_cat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 7345fb7

Please sign in to comment.