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

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