From a9f3529b2f2c3e22f051fd91b14ef2e744954312 Mon Sep 17 00:00:00 2001 From: shadow Date: Tue, 20 Jan 2009 08:57:54 +0000 Subject: [PATCH] don't confuse mds_finish_transno() with PTR_ERR(-ENOENT) Branch b1_8 b=18238 i=green i=umka --- lustre/ChangeLog | 8 +++++++- lustre/mds/mds_open.c | 6 ------ lustre/mds/mds_reint.c | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 1d3c058..ccace8d 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -118,7 +118,13 @@ Details : Page index integer overflow in ll_read_ahead_page information, please refer to bugzilla 17630. Severity : normal -Frequency : rarw +Frequency : rare +Bugzilla : 18238 +Descriptoin: panic in mds_open +Details : don't confuse mds_finish_transno() with PTR_ERR(-ENOENT) + +Severity : normal +Frequency : rare Bugzilla : 17972 Descriptoin: stuck in cache_remove_extent() or panic with accessing to already freed look. diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 5e4fe19..89ca4ff 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -1129,12 +1129,6 @@ int mds_open(struct mds_update_record *rec, int offset, if (use_parent) dchild = dget(dparent); - if (IS_ERR(dchild)) { - rc = PTR_ERR(dchild); - dchild = NULL; /* don't confuse mds_finish_transno() below */ - GOTO(cleanup, rc); - } - if (rec->ur_flags & MDS_OPEN_JOIN_FILE) { acc_mode = accmode(dchild->d_inode, rec->ur_flags); GOTO(found_child, rc); diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index b6ce9f7..85f160c 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -1617,6 +1617,7 @@ int mds_get_parent_child_locked(struct obd_device *obd, struct mds_obd *mds, *dchildp = mds_lookup(obd, name, *dparentp, namelen - 1); if (IS_ERR(*dchildp)) { rc = PTR_ERR(*dchildp); + *dchildp = NULL; CDEBUG(D_INODE, "child lookup error %d\n", rc); GOTO(cleanup, rc); } -- 1.8.3.1