NewDreamNetwork/ceph-client — comment on commit 971d9728082a09868963bbc043bce36947c1d10a
File:  line 0
By liewegas:

It looks to me like the spinlock is dropped in the body of the loop, and we call put without the lock held?

Also, I think this change would break when you have two processes calling fsync() on the directory... the first would claim the list and the second would happily succeed without waiting.