OSDN Git Service

acpi, nfit: Further restrict userspace ARS start requests
authorDan Williams <dan.j.williams@intel.com>
Mon, 15 Oct 2018 19:57:31 +0000 (12:57 -0700)
committerDan Williams <dan.j.williams@intel.com>
Wed, 17 Oct 2018 21:02:32 +0000 (14:02 -0700)
commit594861215c834e4b59a30d4b794f6372717bc197
treee1a2b15d058b7bae4f2985a24e9ace48a86389fe
parentd3abaf43bab8d5b0a3c6b982100d9e2be96de4ad
acpi, nfit: Further restrict userspace ARS start requests

In addition to not allowing ARS start while the background thread is
actively running, prevent ARS start while any scrub request is pending.

This aligns the window for ARS start submission with the status of ARS
reported via sysfs. Previously userspace could sneak its own ARS start
requests in while sysfs reported -EBUSY.

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/nfit/core.c