From: Lukas Czerner <lczerner@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, jmoyer@redhat.com,
Lukas Czerner <lczerner@redhat.com>,
Dmitry Monakhov <dmonakhov@openvz.org>,
Jens Axboe <jens.axboe@oracle.com>
Subject: [PATCH 2/2] blkdev: Simple cleanup in blkdev_issue_zeroout()
Date: Wed, 20 Apr 2011 14:39:32 +0200 [thread overview]
Message-ID: <1303303172-22404-2-git-send-email-lczerner@redhat.com> (raw)
In-Reply-To: <1303303172-22404-1-git-send-email-lczerner@redhat.com>
In blkdev_issue_zeroout() we are submitting regular WRITE bios, so we do
not need to check for -EOPNOTSUPP specifically in case of error. Also
there is no need to have label submit: because there is no way to jump
out from the while cycle without an error and we really want to exit,
rather than try again.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
CC: Dmitry Monakhov <dmonakhov@openvz.org>
CC: Jens Axboe <jens.axboe@oracle.com>
---
block/blk-lib.c | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/block/blk-lib.c b/block/blk-lib.c
index 9260cb0..6165a15 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -140,7 +140,6 @@ int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
bb.flags = 1 << BIO_UPTODATE;
bb.wait = &wait;
-submit:
ret = 0;
while (nr_sects != 0) {
bio = bio_alloc(gfp_mask,
@@ -179,16 +178,6 @@ submit:
/* One of bios in the batch was completed with error.*/
ret = -EIO;
- if (ret)
- goto out;
-
- if (test_bit(BIO_EOPNOTSUPP, &bb.flags)) {
- ret = -EOPNOTSUPP;
- goto out;
- }
- if (nr_sects != 0)
- goto submit;
-out:
return ret;
}
EXPORT_SYMBOL(blkdev_issue_zeroout);
--
1.7.4.4
next prev parent reply other threads:[~2011-04-20 12:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 12:39 [PATCH 1/2] blkdev: Submit discard bio in batches in blkdev_issue_discard() Lukas Czerner
2011-04-20 12:39 ` Lukas Czerner [this message]
2011-04-27 14:05 ` [PATCH 2/2] blkdev: Simple cleanup in blkdev_issue_zeroout() Jeff Moyer
2011-04-27 13:57 ` [PATCH 1/2] blkdev: Submit discard bio in batches in blkdev_issue_discard() Jeff Moyer
2011-04-28 7:57 ` Lukas Czerner
2011-04-28 8:09 ` Lukas Czerner
2011-04-28 13:29 ` Jeff Moyer
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=1303303172-22404-2-git-send-email-lczerner@redhat.com \
--to=lczerner@redhat.com \
--cc=dmonakhov@openvz.org \
--cc=jens.axboe@oracle.com \
--cc=jmoyer@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).