From acb68b0a9bcd8901eab3cd74587e399a822b41cb Mon Sep 17 00:00:00 2001 From: shadow Date: Fri, 24 Oct 2008 05:04:10 +0000 Subject: [PATCH] Kill extra argument for llog_connect, and don't access to ld_tgt_count without protection. Branch b1_8_gate b=16693 i=umka i=tappro --- lustre/include/lustre_log.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lustre/include/lustre_log.h b/lustre/include/lustre_log.h index 75bb3b1..cc69ec6 100644 --- a/lustre/include/lustre_log.h +++ b/lustre/include/lustre_log.h @@ -197,7 +197,7 @@ int llog_catalog_list(struct obd_device *obd, int count, /* llog_net.c */ int llog_initiator_connect(struct llog_ctxt *ctxt); int llog_receptor_accept(struct llog_ctxt *ctxt, struct obd_import *imp); -int llog_origin_connect(struct llog_ctxt *ctxt, int count, +int llog_origin_connect(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid); int llog_handle_connect(struct ptlrpc_request *req); @@ -207,7 +207,7 @@ int llog_obd_repl_cancel(struct llog_ctxt *ctxt, struct lov_stripe_md *lsm, int count, struct llog_cookie *cookies, int flags); int llog_obd_repl_sync(struct llog_ctxt *ctxt, struct obd_export *exp); -int llog_obd_repl_connect(struct llog_ctxt *ctxt, int count, +int llog_obd_repl_connect(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid); @@ -236,7 +236,7 @@ struct llog_operations { struct llog_cookie *logcookies, int numcookies); int (*lop_cancel)(struct llog_ctxt *ctxt, struct lov_stripe_md *lsm, int count, struct llog_cookie *cookies, int flags); - int (*lop_connect)(struct llog_ctxt *ctxt, int count, + int (*lop_connect)(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid); /* XXX add 2 more: commit callbacks and llog recovery functions */ @@ -574,7 +574,7 @@ static inline int llog_create(struct llog_ctxt *ctxt, struct llog_handle **res, RETURN(rc); } -static inline int llog_connect(struct llog_ctxt *ctxt, int count, +static inline int llog_connect(struct llog_ctxt *ctxt, struct llog_logid *logid, struct llog_gen *gen, struct obd_uuid *uuid) { @@ -588,7 +588,7 @@ static inline int llog_connect(struct llog_ctxt *ctxt, int count, if (lop->lop_connect == NULL) RETURN(-EOPNOTSUPP); - rc = lop->lop_connect(ctxt, count, logid, gen, uuid); + rc = lop->lop_connect(ctxt, logid, gen, uuid); RETURN(rc); } -- 1.8.3.1