Re: [PATCH v3 21/25] dax/region: Create resources on sparse DAX regions

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

 



…
> +++ b/drivers/cxl/core/extent.c
> @@ -271,20 +271,67 @@ static void calc_hpa_range(struct cxl_endpoint_decoder *cxled,
>  	hpa_range->end = hpa_range->start + range_len(dpa_range) - 1;
>  }
>
> +static int cxlr_notify_extent(struct cxl_region *cxlr, enum dc_event event,
> +			      struct region_extent *region_extent)
> +{
…
> +	device_lock(dev);
> +	if (dev->driver) {
…
> +	}
> +	device_unlock(dev);
> +	return rc;
> +}
…

Under which circumstances would you become interested to apply a statement
like “guard(device)(dev);”?
https://elixir.bootlin.com/linux/v6.11-rc3/source/include/linux/device.h#L1027

Regards,
Markus





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux