Fix filesys lock. Apparently I just don't understand C as well as I thought