This routine contacts the server to see if the file is locked anywhere.

In it's code, it has the following snippets:

        temp = areq->flags & O_NONBLOCK;
        areq->flags |= O_NONBLOCK;

        ........
        
        if ( temp )
                areq->flags &= ~O_NONBLOCK;



Sure looks to me like that is intended to temporarily set O_NONBLOCK,
and restore the previous state of that flag bit when done without
touching any other flags in areq which may or may not have changed.

Shouldn't the last piece be:
        
        if ( !temp )
                areq->flags &= ~O_NONBLOCK;

i.e. clear flag if it wasn't previously set?

Current logic seems to only clear the flag if it was previously set.

I don't know if this would really have any impact, but if that behavior
is intended, should probably be commented as such.

-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  [EMAIL PROTECTED]
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216

_______________________________________________
OpenAFS-devel mailing list
[EMAIL PROTECTED]
https://lists.openafs.org/mailman/listinfo/openafs-devel

Reply via email to