Re: [PATCH v3 32/51] resources: Split out __allocate_resource()

2015-08-19 Thread Yinghai Lu
On Mon, Aug 17, 2015 at 9:14 PM, Bjorn Helgaas wrote: > On Mon, Jul 27, 2015 at 04:29:50PM -0700, Yinghai Lu wrote: >> It will not hold lock, so we could use it in other functions that >> hold the resource lock already. > > What's the benefit of this patch? Does it fix something? Does it add

Re: [PATCH v3 32/51] resources: Split out __allocate_resource()

2015-08-19 Thread Yinghai Lu
On Mon, Aug 17, 2015 at 9:14 PM, Bjorn Helgaas bhelg...@google.com wrote: On Mon, Jul 27, 2015 at 04:29:50PM -0700, Yinghai Lu wrote: It will not hold lock, so we could use it in other functions that hold the resource lock already. What's the benefit of this patch? Does it fix something?

Re: [PATCH v3 32/51] resources: Split out __allocate_resource()

2015-08-17 Thread Bjorn Helgaas
On Mon, Jul 27, 2015 at 04:29:50PM -0700, Yinghai Lu wrote: > It will not hold lock, so we could use it in other functions that > hold the resource lock already. What's the benefit of this patch? Does it fix something? Does it add some functionality we need? > > -v2: according to Linus, using

Re: [PATCH v3 32/51] resources: Split out __allocate_resource()

2015-08-17 Thread Bjorn Helgaas
On Mon, Jul 27, 2015 at 04:29:50PM -0700, Yinghai Lu wrote: It will not hold lock, so we could use it in other functions that hold the resource lock already. What's the benefit of this patch? Does it fix something? Does it add some functionality we need? -v2: according to Linus, using bool

[PATCH v3 32/51] resources: Split out __allocate_resource()

2015-07-27 Thread Yinghai Lu
It will not hold lock, so we could use it in other functions that hold the resource lock already. -v2: according to Linus, using "bool lock" as parameter aka "conditionally take lock" is *wrong*. Signed-off-by: Yinghai Lu Acked-by: Linus Torvalds --- kernel/resource.c | 70

[PATCH v3 32/51] resources: Split out __allocate_resource()

2015-07-27 Thread Yinghai Lu
It will not hold lock, so we could use it in other functions that hold the resource lock already. -v2: according to Linus, using bool lock as parameter aka conditionally take lock is *wrong*. Signed-off-by: Yinghai Lu ying...@kernel.org Acked-by: Linus Torvalds torva...@linux-foundation.org