On 2020/11/17 2:00, Christoph Hellwig wrote: > On Wed, Nov 11, 2020 at 10:00:44PM +0900, Damien Le Moal wrote: >> +#define null_unlock_zone_res(dev, flags) \ >> + do { \ >> + if ((dev)->need_zone_res_mgmt) \ >> + spin_unlock_irqrestore(&(dev)->zone_res_lock, \ >> + (flags)); \ >> + } while (0) > > Can you use inline functions here? The macro make it easier to handle the save/restore flags compared to inline function. I guess I could replace spin_lock_irqsave() with spin_lock_irq() and spin_unlock_irqrestore() with spin_unlock_irq() since there is no nesting. But I do not like these functions as they are error prone (if one misses their use and starts nesting locks with the same functions). But no strong feeling against it either. I can do the switch. > > Otherwise this looks good to me: > > Reviewed-by: Christoph Hellwig <hch@xxxxxx> > -- Damien Le Moal Western Digital Research