The first patch reworks the lock handling to both avoid a race condition and to simplify things down to one single lock file. Then there's some minor cleanup. Marko Myllynen says "Otherwise looking good, feel free to add Acked-by or Reviewed-by to the patch if you like :-)", but I'm too timid. :)