You should compute the size before you take the write lock... in the common case, you will need it (either here or on l183)