From 553d75f47769cc999d5eaf07a51458a0073475a9 Mon Sep 17 00:00:00 2001 From: tappro Date: Sun, 6 Aug 2006 21:20:50 +0000 Subject: [PATCH] - if fid2 exists and this was create operation, then it is not same as returned in case no creation happens. The result was 'Stale NFS file handle' error in some tests - 7b, 23. now 23 pass but in 7b the other nasty bug occurs. --- lustre/mdc/mdc_locks.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 44fdcff..11099b4 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -679,7 +679,9 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data, !it_disposition(it, DISP_OPEN_CREATE)) { it_set_disposition(it, DISP_ENQ_COMPLETE); /* Also: did we find the same inode? */ - if (memcmp(&op_data->fid2, &mdt_body->fid1, sizeof(op_data->fid2))) + if (!((it->it_create_mode & O_CREAT) || it->it_op & IT_CREAT) + && memcmp(&op_data->fid2, &mdt_body->fid1, + sizeof(op_data->fid2))) RETURN(-ESTALE); } -- 1.8.3.1