From: pschwan Date: Thu, 7 Nov 2002 04:40:21 +0000 (+0000) Subject: small fixups to revalidate2 lock matching X-Git-Tag: v1_7_100~4287 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=36fdb1b76b3c40b01b2b6245728f00c7c86edcd8;p=fs%2Flustre-release.git small fixups to revalidate2 lock matching --- diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index 53c0ef4d4..816543a 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -98,17 +98,18 @@ static int revalidate2_finish(int flag, struct ptlrpc_request *request, static int ll_have_lock(struct dentry *de) { - struct ll_sb_info *sbi = ll_s2sbi(de->d_sb); + struct ll_sb_info *sbi = ll_s2sbi(de->d_sb); struct lustre_handle lockh; __u64 res_id[RES_NAME_SIZE] = {0}; struct obd_device *obddev; ENTRY; - if (!de->d_inode) + if (!de->d_inode) RETURN(0); obddev = class_conn2obd(&sbi->ll_mdc_conn); res_id[0] = de->d_inode->i_ino; + res_id[1] = de->d_inode->i_generation; CDEBUG(D_INFO, "trying to match res "LPU64"\n", res_id[0]); @@ -139,7 +140,7 @@ int ll_revalidate2(struct dentry *de, int flags, struct lookup_intent *it) RETURN(0); } - if (ll_have_lock(de)) + if (it == NULL && ll_have_lock(de)) GOTO(out, rc = 0); rc = ll_intent_lock(de->d_parent->d_inode, &de, it, revalidate2_finish);