zram: return EBUSY when max_comp_streams change fails for device in use
Subsystems (2)
PATCH 1/1 zram: return EBUSY when max_comp_streams change fails for device in use
Both disksize and comp_algorithm return EBUSY when a change is attempted to a device in use, and so should max_comp_streams.
Signed-off-by Sami Kerola <[email protected]>
--- drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/zram/zram_drv.c +1 -1
@@ -139,7 +139,7 @@ static ssize_t max_comp_streams_store(struct device *dev,if (init_done (zram)) {if (!zcomp_set_max_streams (zram->comp, num)) {pr_info ("Cannot change max compression streams\n" ); - ret = -EINVAL ; + ret = -EBUSY ; goto out; } }
Signature · 1 line
2.0.3
Quoted 13 lines · Sami Kerola
Both disksize and
comp_algorithmreturn EBUSY when a change is attempted to a device in use, and so shouldmax_comp_streams.Signed-off-by Sami Kerola <[email protected]>--- drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/block/zram/zram_drv.c +0
-0
drivers/block/zram/zram_drv.c static ssize_t max_comp_streams_store(struct device *dev, · line 145
Quoted 8 lines
drivers/block/zram/zram_drv.c +1
-1@@ -139,7 +139,7 @@ static ssize_t max_comp_streams_store(struct device *dev,if (init_done (zram)) {if (!zcomp_set_max_streams (zram->comp, num)) {pr_info ("Cannot change max compression streams\n" ); - ret = -EINVAL ; + ret = -EBUSY ; goto out; } }
NACK.
failed zcomp_set_max_streams() has nothing to do with device being busy.
-ss