Thinking about this some more, I like it even less.

VOP_ISLOCKED is actually documented by the man page to return either 0
or 1. Not some LK flag. The fact that some filesystems are lazy and
just feed up lockstatus doesn't mean lockstatus is broken. It means
tmpfs_islocked and ufs_islocked are broken. The code currently in the
tree is (at long last) compliant with the man page.

According to lock(9), lockstatus() is currently broken:

lockstatus(lock)
Determine the status of lock lock.  Returns LK_EXCLUSIVE or LK_SHARED
for exclusive-access and shared-access locks respectively.

-p.

Reply via email to