From: adilger Date: Fri, 30 Aug 2002 06:03:16 +0000 (+0000) Subject: Add assertions to {push,pop}_ctxt because we are oopsing on dev in obdfilter X-Git-Tag: 0.5.5~3 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=497d95075de175a39867b430f4070f6d0c76b4d8;p=fs%2Flustre-release.git Add assertions to {push,pop}_ctxt because we are oopsing on dev in obdfilter in pop_ctxt(), maybe becase saved->pwd is NULL. --- diff --git a/lustre/lib/simple.c b/lustre/lib/simple.c index 3a34247..d38b3f2 100644 --- a/lustre/lib/simple.c +++ b/lustre/lib/simple.c @@ -48,15 +48,22 @@ void push_ctxt(struct obd_run_ctxt *save, struct obd_run_ctxt *new) save->pwd = dget(current->fs->pwd); save->pwdmnt = mntget(current->fs->pwdmnt); + LASSERT(save->pwd); + LASSERT(save->pwdmnt); + LASSERT(new->pwd); + LASSERT(new->pwdmnt); + set_fs(new->fs); set_fs_pwd(current->fs, new->pwdmnt, new->pwd); } void pop_ctxt(struct obd_run_ctxt *saved) { - ASSERT_KERNEL_CTXT("popping non-kernel context!\n"); ASSERT_CTXT_MAGIC(saved->magic); + ASSERT_KERNEL_CTXT("popping non-kernel context!\n"); set_fs(saved->fs); + LASSERT(saved->pwd); + LASSERT(saved->pwdmnt); set_fs_pwd(current->fs, saved->pwdmnt, saved->pwd); dput(saved->pwd);