Linux: correct use of atomic_add and atomic_sub functions