From: alex Date: Wed, 23 Jun 2004 04:21:46 +0000 (+0000) Subject: - mds_preprw() handles failed mds_fid2dentry() properly X-Git-Tag: 1.3.4~701 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=e2b53d12218e8d07922fbfc0686c9c24e815a27b;p=fs%2Flustre-release.git - mds_preprw() handles failed mds_fid2dentry() properly --- diff --git a/lustre/mds/mds_lmv.c b/lustre/mds/mds_lmv.c index 3267e6f..b29da76 100644 --- a/lustre/mds/mds_lmv.c +++ b/lustre/mds/mds_lmv.c @@ -673,7 +673,12 @@ int mds_preprw(int cmd, struct obd_export *exp, struct obdo *oa, fid.id = obj->ioo_id; fid.generation = obj->ioo_gr; dentry = mds_fid2dentry(mds, &fid, NULL); - LASSERT(!IS_ERR(dentry)); + if (IS_ERR(dentry)) { + CERROR("can't get dentry for %lu/%lu: %d\n", + (unsigned long) fid.id, + (unsigned long) fid.generation, (int) PTR_ERR(dentry)); + GOTO(cleanup, rc = (int) PTR_ERR(dentry)); + } if (dentry->d_inode == NULL) { CERROR("trying to BRW to non-existent file "LPU64"\n",