Blame SOURCES/c521093-ndctl-scrub-Stop-translating-return-values.patch

0dc130
ndctl/scrub: Stop translating return values
0dc130
0dc130
BZ: 
0dc130
Brew: 
0dc130
0dc130
commit c52109355b715bbe21e284090435bee7563863cc
0dc130
Author: Dan Williams <dan.j.williams@intel.com>
0dc130
Date:   Wed May 26 16:33:04 2021 -0700
0dc130
0dc130
    ndctl/scrub: Stop translating return values
0dc130
    
0dc130
    In preparation for triggering a poll loop within ndctl_bus_start_scrub(),
0dc130
    stop translating return values into -EOPNOTSUPP.
0dc130
    
0dc130
    Link: https://lore.kernel.org/r/162207198482.3715490.5994844104395495686.stgit@dwillia2-desk3.amr.corp.intel.com
0dc130
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
0dc130
    Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
0dc130
0dc130
diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c
0dc130
index aa36a3c..e5641fe 100644
0dc130
--- a/ndctl/lib/libndctl.c
0dc130
+++ b/ndctl/lib/libndctl.c
0dc130
@@ -1354,14 +1354,8 @@ static int __ndctl_bus_get_scrub_state(struct ndctl_bus *bus,
0dc130
 NDCTL_EXPORT int ndctl_bus_start_scrub(struct ndctl_bus *bus)
0dc130
 {
0dc130
 	struct ndctl_ctx *ctx = ndctl_bus_get_ctx(bus);
0dc130
-	int rc;
0dc130
 
0dc130
-	rc = sysfs_write_attr(ctx, bus->scrub_path, "1\n");
0dc130
-	if (rc == -EBUSY)
0dc130
-		return rc;
0dc130
-	else if (rc < 0)
0dc130
-		return -EOPNOTSUPP;
0dc130
-	return 0;
0dc130
+	return sysfs_write_attr(ctx, bus->scrub_path, "1\n");
0dc130
 }
0dc130
 
0dc130
 NDCTL_EXPORT int ndctl_bus_get_scrub_state(struct ndctl_bus *bus)