lock is acquired on open/create when file has DMEXCL set in mode, so we need to reopen the file after setting the bit with wstat.