Messages in this thread | | | Date | Wed, 8 Mar 2017 07:50:59 -0800 | From | Christoph Hellwig <> | Subject | Re: [PATCH 3/5] fs, xfs: convert xlog_ticket.t_ref from atomic_t to refcount_t |
| |
> - ASSERT(atomic_read(&ticket->t_ref) > 0); > - atomic_inc(&ticket->t_ref); > + ASSERT(refcount_read(&ticket->t_ref) > 0); > + refcount_inc(&ticket->t_ref);
With strict refcount semantics refcount_inc should check that the count is larger than 0, otherwise we'd need to use recount_inc_not_zero or whatever you're going to call it.
Is that something the recount code does / could do?
| |