lkml.org 
[lkml]   [2020]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v16 1/3] scsi: ufs: Introduce HPB feature
Date
> 
>
> On Sat, Dec 19, 2020 at 06:18:47PM +0900, Daejun Park wrote:
> > +static int ufshpb_get_state(struct ufshpb_lu *hpb)
> > +{
> > + return atomic_read(&hpb->hpb_state);
> > +}
> > +
> > +static void ufshpb_set_state(struct ufshpb_lu *hpb, int state)
> > +{
> > + atomic_set(&hpb->hpb_state, state);
> > +}
>
> You have a lock for the state, and yet the state is an atomic variable
> and you do not use the lock here at all. You don't use the lock at all
> infact...
>
> So either the lock needs to be dropped, or you need to use the lock and
> make the state a normal variable please.
hpb_state_lock is mainly protecting the list of active regions.
Just grep lh_lru_rgn in patch 2/3.

Thanks,
Avri

\
 
 \ /
  Last update: 2020-12-19 13:51    [W:0.070 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site