From: Bruno Faccini Date: Tue, 27 Aug 2013 19:20:00 +0000 (+0200) Subject: LU-3701 ldlm: refine LU-2665 patch for POSIX compliance X-Git-Tag: 2.4.93~57 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=26ede4e3d5bf8ec484032435b0bc2efe5ef47f77;hp=a926e593b0c769d20aef191e2b0b6b1d881b6637;p=fs%2Flustre-release.git LU-3701 ldlm: refine LU-2665 patch for POSIX compliance Follow-on to patch introduced to fix LU-2665 ticket (Gerrit Change at http://review.whamcloud.com/6415 with Change-Id: I8faa331712abeadee46eabe111ee1c23a05840d5). Original patch introduced regressions against POSIX test suite (fcntl.18/fcntl.35 tests in LSB-VSX POSIX test suite at http://www.opengroup.org/testing/linux-test/lsb-vsx.html), so the idea is to only resend F_UNLCKs to have both LU-2665 bug and POSIX test suite happy. Test-Parameters: testlist=posix Signed-off-by: Bruno Faccini Change-Id: I8d325cb7039bb3f3f74f2a9829cbaea760d9e20f Reviewed-on: http://review.whamcloud.com/7453 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 12046eb..abc2b25 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -908,7 +908,9 @@ resend: can not rely on caller and this mainly for F_UNLCKs (explicits or automatically generated by Kernel to clean current FLocks upon exit) that can't be trashed */ - if ((rc == -EINTR) || (rc == -ETIMEDOUT)) + if (((rc == -EINTR) || (rc == -ETIMEDOUT)) && + (einfo->ei_type == LDLM_FLOCK) && + (einfo->ei_mode == LCK_NL)) goto resend; RETURN(rc); }