From: Sami Kerola <kerolasa@iki.fi>
To: linux-kernel@vger.kernel.org
Cc: kerolasa@iki.fi, Minchan Kim <minchan@kernel.org>,
Nitin Gupta <ngupta@vflare.org>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: [PATCH] zram: return EBUSY when max_comp_streams change fails for device in use
Date: Sun, 3 Aug 2014 23:48:49 +0100 [thread overview]
Message-ID: <1407106129-30705-1-git-send-email-kerolasa@iki.fi> (raw)
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 <kerolasa@iki.fi>
---
drivers/block/zram/zram_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 36e54be..0211734 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -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;
}
}
--
2.0.3
next reply other threads:[~2014-08-03 22:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-03 22:48 Sami Kerola [this message]
2014-08-04 11:39 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1407106129-30705-1-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®