From: adilger Date: Sat, 3 Jan 2004 00:02:31 +0000 (+0000) Subject: Don't remove directory inodes from locks prematurely. Causes pages not to X-Git-Tag: 1.0.3~148 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=a4dca0a6c658714065564202b875189a88368bcf;p=fs%2Flustre-release.git Don't remove directory inodes from locks prematurely. Causes pages not to be evicted if lock is revoked. b=2451 r=phik --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index f93070f..3513383 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -20,6 +20,7 @@ tbd Cluster File Systems, Inc. - use kmalloc instead of slabs in portals (2430) - don't create duplicate records when a failover MDS is present (2442) - remove unnecessary mount age check (2332) + - don't remove directory inodes from locks prematurely (2451) 2003-12-13 Cluster File Systems, Inc. * version 1.0.1 diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index f5bacb5..1b67df2 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -289,6 +289,9 @@ static int lookup_it_finish(struct ptlrpc_request *request, int offset, LASSERT(lsm->lsm_object_id != 0); + /* bug 2334: drop MDS lock before acquiring OST lock */ + ll_intent_drop_lock(it); + rc = ll_extent_lock(NULL, inode, lsm, LCK_PR, &extent, &lockh); if (rc != ELDLM_OK) { @@ -348,9 +351,6 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry, if (rc < 0) GOTO(out, retval = ERR_PTR(rc)); - /* bug 2334: drop MDS lock before acquiring OST lock */ - ll_intent_drop_lock(it); - rc = lookup_it_finish(req, 1, it, &icbd); if (rc != 0) { ll_intent_release(it);