From e2b53d12218e8d07922fbfc0686c9c24e815a27b Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 23 Jun 2004 04:21:46 +0000 Subject: [PATCH] - mds_preprw() handles failed mds_fid2dentry() properly --- lustre/mds/mds_lmv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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", -- 1.8.3.1