This is a repost of the file_sync semaphore support. The main difference in this patch is patch1 does a lot better at handling NULL fences in some places. The poll code and ioctls should handle ending up with fence being NULL properly now. Dave.