Commit c03285bf authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] mtdblock fixes

Assorted compile fixes in mtdblock.c
parent 9cdf73b0
...@@ -413,7 +413,7 @@ static void handle_mtdblock_request(void) ...@@ -413,7 +413,7 @@ static void handle_mtdblock_request(void)
for (;;) { for (;;) {
INIT_REQUEST; INIT_REQUEST;
req = CURRENT; req = CURRENT;
spin_unlock_irq(&QUEUE->queue_lock); spin_unlock_irq(QUEUE->queue_lock);
mtdblk = mtdblks[minor(req->rq_dev)]; mtdblk = mtdblks[minor(req->rq_dev)];
res = 0; res = 0;
...@@ -457,7 +457,7 @@ static void handle_mtdblock_request(void) ...@@ -457,7 +457,7 @@ static void handle_mtdblock_request(void)
} }
end_req: end_req:
spin_lock_irq(&QUEUE->queue_lock); spin_lock_irq(QUEUE->queue_lock);
if (!end_that_request_first(req, res, req->hard_cur_sectors)) { if (!end_that_request_first(req, res, req->hard_cur_sectors)) {
blkdev_dequeue_request(req); blkdev_dequeue_request(req);
end_that_request_last(req); end_that_request_last(req);
...@@ -487,16 +487,16 @@ int mtdblock_thread(void *dummy) ...@@ -487,16 +487,16 @@ int mtdblock_thread(void *dummy)
while (!leaving) { while (!leaving) {
add_wait_queue(&thr_wq, &wait); add_wait_queue(&thr_wq, &wait);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irq(&QUEUE->queue_lock); spin_lock_irq(QUEUE->queue_lock);
if (QUEUE_EMPTY || QUEUE_PLUGGED) { if (QUEUE_EMPTY || QUEUE_PLUGGED) {
spin_unlock_irq(&QUEUE->queue_lock); spin_unlock_irq(QUEUE->queue_lock);
schedule(); schedule();
remove_wait_queue(&thr_wq, &wait); remove_wait_queue(&thr_wq, &wait);
} else { } else {
remove_wait_queue(&thr_wq, &wait); remove_wait_queue(&thr_wq, &wait);
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
handle_mtdblock_request(); handle_mtdblock_request();
spin_unlock_irq(&QUEUE->queue_lock); spin_unlock_irq(QUEUE->queue_lock);
} }
} }
...@@ -541,7 +541,7 @@ static int mtdblock_ioctl(struct inode * inode, struct file * file, ...@@ -541,7 +541,7 @@ static int mtdblock_ioctl(struct inode * inode, struct file * file,
return -EACCES; return -EACCES;
#endif #endif
fsync_bdev(inode->i_bdev); fsync_bdev(inode->i_bdev);
invalidate_bdev(inode->b_rdev, 0); invalidate_bdev(inode->i_bdev, 0);
down(&mtdblk->cache_sem); down(&mtdblk->cache_sem);
write_cached_data(mtdblk); write_cached_data(mtdblk);
up(&mtdblk->cache_sem); up(&mtdblk->cache_sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment