Once the ENOLCK is detected we expect to retry the acquisition.

Anyway, in the edge case the flushing happens and the while is no more
executed, nfs_flush() (and nfs4_flush()) can return with a wrong
err value of ENOLCK.
Bring it back to 0, as we expect to have for that case.

Reported by:	kris
Reviewed by:	kib
This commit is contained in:
Attilio Rao 2008-05-27 00:20:19 +00:00
parent 8ea4cf79cb
commit edf4632700
2 changed files with 6 additions and 2 deletions

View File

@ -2693,8 +2693,10 @@ loop:
BO_MTX(bo), "nfsfsync", slpflag, slptimeo);
if (error == 0)
panic("nfs4_fsync: inconsistent lock");
if (error == ENOLCK)
if (error == ENOLCK) {
error = 0;
goto loop;
}
if (nfs4_sigintr(nmp, NULL, td)) {
error = EINTR;
goto done;

View File

@ -2941,8 +2941,10 @@ loop:
BUF_UNLOCK(bp);
goto loop;
}
if (error == ENOLCK)
if (error == ENOLCK) {
error = 0;
goto loop;
}
if (nfs_sigintr(nmp, NULL, td)) {
error = EINTR;
goto done;