do_ubd is actually just a boolean variable - the way it is used currently is a
leftover from the old 2.4 block layer, but it is still used; its use is
suspicious, but removing it would be too intrusive for now and needs more
thinking.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
static DEFINE_MUTEX(ubd_lock);
static DEFINE_MUTEX(ubd_lock);
-static void (*do_ubd)(void);
+/* XXX - this made sense in 2.4 days, now it's only used as a boolean, and
+ * probably it doesn't make sense even for that. */
+static int do_ubd;
static int ubd_open(struct inode * inode, struct file * filp);
static int ubd_release(struct inode * inode, struct file * file);
static int ubd_open(struct inode * inode, struct file * filp);
static int ubd_release(struct inode * inode, struct file * file);
spin_unlock(&ubd_io_lock);
}
spin_unlock(&ubd_io_lock);
}
+/* XXX - move this inside ubd_intr. */
/* Called without ubd_io_lock held, and only in interrupt context. */
static void ubd_handler(void)
{
/* Called without ubd_io_lock held, and only in interrupt context. */
static void ubd_handler(void)
{
struct request *rq = elv_next_request(ubd_queue);
int n;
struct request *rq = elv_next_request(ubd_queue);
int n;
intr_count++;
n = os_read_file(thread_fd, &req, sizeof(req));
if(n != sizeof(req)){
intr_count++;
n = os_read_file(thread_fd, &req, sizeof(req));
if(n != sizeof(req)){
return;
err = prepare_request(req, &io_req);
if(!err){
return;
err = prepare_request(req, &io_req);
if(!err){
n = os_write_file(thread_fd, (char *) &io_req,
sizeof(io_req));
if(n != sizeof(io_req))
n = os_write_file(thread_fd, (char *) &io_req,
sizeof(io_req));
if(n != sizeof(io_req))