On Fri, Jun 29, 2018 at 04:05:40PM +0200, David Sterba wrote: > On Tue, Jun 26, 2018 at 05:00:46PM +0300, Nikolay Borisov wrote: > > On 25.06.2018 19:38, David Sterba wrote: > > > There are several WARN_ON calls that catch incrorrect reference counter > > > updates, but this is what the refcount_t does already: > > > > > > * refcount_inc from 0 will warn > > > * refcount_dec_and_test from 0 will warn > > > > > > > But these warnings are only going to be triggered in the case of > > CONFIG_REFCOUNT_FULL otherwise refcount falls back to plain atomic > > operations. > > Right, I'm for REFCOUNT_FULL on by default obviously, but we need to > take handle the case where it's not. And there isn't a refcount type > with the full semantics.
There refcount helpers will be extended to allow the full check semantics so I'll use them and drop the WARN_ONs once the patch gets merged. https://lore.kernel.org/lkml/20180703100102.16615-1-mark.rutl...@arm.com/ -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html