Re: [PATCH 5/8] sg: add free list, rework locking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2018-10-19 at 02:24 -0400, Douglas Gilbert wrote:
+AD4 static void
+AD4 -sg+AF8-fill+AF8-request+AF8-table(struct sg+AF8-fd +ACo-sfp, struct sg+AF8-req+AF8-info +ACo-rinfo)
+AD4 +-sg+AF8-fill+AF8-request+AF8-table(struct sg+AF8-fd +ACo-sfp, struct sg+AF8-req+AF8-info +ACo-rinfo,
+AD4 +-                     int max+AF8-num)
+AD4  +AHs
+AD4         struct sg+AF8-request +ACo-srp+ADs
+AD4         int val+ADs
+AD4 -       unsigned int ms+ADs
+AD4  
+AD4         val +AD0 0+ADs
+AD4 -       list+AF8-for+AF8-each+AF8-entry(srp, +ACY-sfp-+AD4-rq+AF8-list, entry) +AHs
+AD4 -               if (val +AD4APQ SG+AF8-MAX+AF8-QUEUE)
+AD4 -                       break+ADs
+AD4 -               rinfo+AFs-val+AF0.req+AF8-state +AD0 srp-+AD4-done +- 1+ADs
+AD4 +-       list+AF8-for+AF8-each+AF8-entry(srp, +ACY-sfp-+AD4-rq+AF8-list, rq+AF8-entry) +AHs
+AD4 +-               if (val +AD4APQ max+AF8-num)
+AD4 +-                       return+ADs

What protects the sfp-+AD4-rq+AF8-list against concurrent changes? It seems to me
like all other code that iterates over or modifies that list protects that
list with rq+AF8-list+AF8-lock?

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux