From: tappro Date: Sun, 6 Aug 2006 21:20:50 +0000 (+0000) Subject: - if fid2 exists and this was create operation, then it is not same as returned X-Git-Tag: v1_8_0_110~486^2~1255 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=553d75f47769cc999d5eaf07a51458a0073475a9;p=fs%2Flustre-release.git - 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. --- 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); }