From: Asias He <asias@redhat.com>
To: linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org
Cc: Asias He <asias@redhat.com>, Jens Axboe <axboe@kernel.dk>,
Chris Mason <chris.mason@oracle.com>
Subject: [PATCH 2/2] block: Drop dead function blk_abort_queue()
Date: Fri, 25 May 2012 11:10:22 +0800 [thread overview]
Message-ID: <1337915422-24988-2-git-send-email-asias@redhat.com> (raw)
In-Reply-To: <1337915422-24988-1-git-send-email-asias@redhat.com>
This function is only used by btrfs code in btrfs_abort_devices()
(seems in a wrong way). However, btrfs_abort_devices() is not used
anywhere. Let's remove the dead code to avoid any confusion.
Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-kernel@vger.kernel.org
Cc: Chris Mason <chris.mason@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Asias He <asias@redhat.com>
---
block/blk-timeout.c | 41 -----------------------------------------
include/linux/blkdev.h | 1 -
2 files changed, 42 deletions(-)
diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 7803548..6e4744c 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -197,44 +197,3 @@ void blk_add_timer(struct request *req)
mod_timer(&q->timeout, expiry);
}
-/**
- * blk_abort_queue -- Abort all request on given queue
- * @queue: pointer to queue
- *
- */
-void blk_abort_queue(struct request_queue *q)
-{
- unsigned long flags;
- struct request *rq, *tmp;
- LIST_HEAD(list);
-
- /*
- * Not a request based block device, nothing to abort
- */
- if (!q->request_fn)
- return;
-
- spin_lock_irqsave(q->queue_lock, flags);
-
- elv_abort_queue(q);
-
- /*
- * Splice entries to local list, to avoid deadlocking if entries
- * get readded to the timeout list by error handling
- */
- list_splice_init(&q->timeout_list, &list);
-
- list_for_each_entry_safe(rq, tmp, &list, timeout_list)
- blk_abort_request(rq);
-
- /*
- * Occasionally, blk_abort_request() will return without
- * deleting the element from the list. Make sure we add those back
- * instead of leaving them on the local stack list.
- */
- list_splice(&list, &q->timeout_list);
-
- spin_unlock_irqrestore(q->queue_lock, flags);
-
-}
-EXPORT_SYMBOL_GPL(blk_abort_queue);
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 4d4ac24..dcd9738 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -809,7 +809,6 @@ extern bool __blk_end_request_err(struct request *rq, int error);
extern void blk_complete_request(struct request *);
extern void __blk_complete_request(struct request *);
extern void blk_abort_request(struct request *);
-extern void blk_abort_queue(struct request_queue *);
extern void blk_unprep_request(struct request *);
/*
--
1.7.10.2
next prev parent reply other threads:[~2012-05-25 3:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 3:10 [PATCH 1/2] btrfs: Drop unused function btrfs_abort_devices() Asias He
2012-05-25 3:10 ` Asias He [this message]
2012-05-28 13:41 ` David Sterba
2012-06-06 2:17 ` Asias He
2012-06-06 9:24 ` David Sterba
2012-06-06 12:38 ` Asias He
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=1337915422-24988-2-git-send-email-asias@redhat.com \
--to=asias@redhat.com \
--cc=axboe@kernel.dk \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@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).