From a13919f89060d6c9f0e867fc29f26711f8cdaa09 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 4 Aug 2004 20:33:59 +0000 Subject: [PATCH] Land b1_4_smallfix onto b1_4 (20040804_1301) - use transno after validating reply (3892) - use different name for 2nd ptlrpcd thread (3887) - fix mds_postrecov to initialize import for llog ctxt (3121) - be sure to send a reply for a CANCEL rpc with bad export (3863) - don't allow enqueue to complete on a destroyed export (3822) - down write_lock before checking llog header bitmap (3825) - recover from lock replay timeout (3764) - replace some LBUG about llog ops with error handling (3841) - add libwrap support for the TCP acceptor (3996) - install man pages and include them in rpms (3100) - add new init script for (un)mounting lustre filesystems (2593) - run chkconfig in %post for init scripts (3701) - drop scimac NAL (unmaintained) --- lustre/ptlrpc/llog_server.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lustre/ptlrpc/llog_server.c b/lustre/ptlrpc/llog_server.c index d064fc8..ca94d89 100644 --- a/lustre/ptlrpc/llog_server.c +++ b/lustre/ptlrpc/llog_server.c @@ -76,7 +76,8 @@ int llog_origin_handle_create(struct ptlrpc_request *req) } ctxt = llog_get_context(obd, body->lgd_ctxt_idx); - LASSERT(ctxt != NULL); + if (ctxt == NULL) + GOTO(out, rc = -EINVAL); push_ctxt(&saved, ctxt->loc_lvfs_ctxt, NULL); rc = llog_create(ctxt, &loghandle, logid, name); @@ -126,7 +127,8 @@ int llog_origin_handle_prev_block(struct ptlrpc_request *req) GOTO(out, rc = -ENOMEM); ctxt = llog_get_context(obd, body->lgd_ctxt_idx); - LASSERT(ctxt != NULL); + if (ctxt == NULL) + GOTO(out, rc = -EINVAL); push_ctxt(&saved, ctxt->loc_lvfs_ctxt, NULL); rc = llog_create(ctxt, &loghandle, &body->lgd_logid, NULL); @@ -194,7 +196,8 @@ int llog_origin_handle_next_block(struct ptlrpc_request *req) GOTO(out, rc = -ENOMEM); ctxt = llog_get_context(obd, body->lgd_ctxt_idx); - LASSERT(ctxt != NULL); + if (ctxt == NULL) + GOTO(out, rc = -EINVAL); push_ctxt(&saved, ctxt->loc_lvfs_ctxt, NULL); rc = llog_create(ctxt, &loghandle, &body->lgd_logid, NULL); @@ -258,7 +261,8 @@ int llog_origin_handle_read_header(struct ptlrpc_request *req) } ctxt = llog_get_context(obd, body->lgd_ctxt_idx); - LASSERT(ctxt != NULL); + if (ctxt == NULL) + GOTO(out, rc = -EINVAL); push_ctxt(&saved, ctxt->loc_lvfs_ctxt, NULL); rc = llog_create(ctxt, &loghandle, &body->lgd_logid, NULL); -- 1.8.3.1