[PATCH 0/1] USB: usbfs: replace atomic64 accesses by spinlock

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

 



patch for f_fs.c:
> > > > + atomic64_sub(amount, &ffs->mmap_mem_usage);    

Greg KH:
> > > Why not use a real lock instead of trying to do a fake one with
> > > this atomic variable?

Ingo:
> > I just took the code from "drivers/usb/core/devio.c",
> > "usbfs_increase_memory_usage()".
> > ...
> > You are of course right: You can easily use a lock here and this
> > makes the intention of the code a lot clearer I guess.
> > 
> > I will modify the patch accordingly.  

Alan Stern:
> If you also feel like making a similar change to the code in devio.c,
> it would be welcome.

Ingo Rohloff (1):
  USB: usbfs: Use a spinlock instead of atomic accesses to tally used
    memory.

 drivers/usb/core/devio.c | 35 ++++++++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 11 deletions(-)

-- 
2.17.1



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux