lkml.org 
[lkml]   [2017]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/4] fs, afs: convert afs_cell.usage from atomic_t to refcount_t
Date
Reshetova, Elena <elena.reshetova@intel.com> wrote:

> Thank you very much David for testing the patches!
> I guess for this one and other two patches it means that if we want to do the atomic_t --> refcount_t conversions,
> we need to do +1 on the whole counting scheme to avoid issues around reaching zero.
> Do you see this approach reasonable? I can give it a try, if it makes sense in your opinion.

Or you could create a refcount_inc_may_resurrect() function that does allow
increment from 0. Make it take a lock-check like the rcu functions do.

David

\
 
 \ /
  Last update: 2017-02-22 18:29    [W:0.419 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site