summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
829731a)
This patch moves 'loghandle->lgh_hdr' assignment call
below LASSERT(). This avoids a case when loghandle parameter
is NULL and dereferencing the NULL pointer would fault
before it reaches LASSERT().
Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@seagate.com>
Change-Id: Ie9bcd172a264e104dca300a8bac04d2bd132efb0
Reviewed-on: https://review.whamcloud.com/24561
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
{
struct llog_thread_info *lgi = llog_info(env);
struct dt_device *dt;
{
struct llog_thread_info *lgi = llog_info(env);
struct dt_device *dt;
- struct llog_log_hdr *llh = loghandle->lgh_hdr;
+ struct llog_log_hdr *llh;
struct thandle *th;
int rc;
int rc1;
struct thandle *th;
int rc;
int rc1;
+ LASSERT(loghandle != NULL);
+ LASSERT(loghandle->lgh_ctxt != NULL);
+ LASSERT(loghandle->lgh_obj != NULL);
+
+ llh = loghandle->lgh_hdr;
+
CDEBUG(D_RPCTRACE, "Canceling %d in log "DFID"\n", index,
PFID(&loghandle->lgh_id.lgl_oi.oi_fid));
CDEBUG(D_RPCTRACE, "Canceling %d in log "DFID"\n", index,
PFID(&loghandle->lgh_id.lgl_oi.oi_fid));
- LASSERT(loghandle != NULL);
- LASSERT(loghandle->lgh_ctxt != NULL);
- LASSERT(loghandle->lgh_obj != NULL);
-
dt = lu2dt_dev(loghandle->lgh_obj->do_lu.lo_dev);
th = dt_trans_create(env, dt);
dt = lu2dt_dev(loghandle->lgh_obj->do_lu.lo_dev);
th = dt_trans_create(env, dt);