aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@googlemail.com>2008-04-27 09:38:25 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-27 09:38:25 -0400
commitf64eee7bb2819da5506a2db5b6297612a17eb3f8 (patch)
tree6df0d0a51cbafb3689e58c86fdbf6d70a1de49ca /drivers/ide
parentcc12175ff2eadb0918d573169af88429440a21ae (diff)
ide-tape: remove tape->cache_stage
Prior to allocating a new pipeline stage, the code checked for the existence of a cached pipeline stage to use. Do away with and stick to normal pipeline stages only. [bart: keep idetape_kmalloc_stage() for now] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-tape.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index d3d8b8d5157c..8883eea4658f 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -365,8 +365,6 @@ typedef struct ide_tape_obj {
365 idetape_stage_t *next_stage; 365 idetape_stage_t *next_stage;
366 /* New requests will be added to the pipeline here */ 366 /* New requests will be added to the pipeline here */
367 idetape_stage_t *last_stage; 367 idetape_stage_t *last_stage;
368 /* Optional free stage which we can use */
369 idetape_stage_t *cache_stage;
370 int pages_per_stage; 368 int pages_per_stage;
371 /* Wasted space in each stage */ 369 /* Wasted space in each stage */
372 int excess_bh_size; 370 int excess_bh_size;
@@ -1686,16 +1684,10 @@ abort:
1686 1684
1687static idetape_stage_t *idetape_kmalloc_stage(idetape_tape_t *tape) 1685static idetape_stage_t *idetape_kmalloc_stage(idetape_tape_t *tape)
1688{ 1686{
1689 idetape_stage_t *cache_stage = tape->cache_stage;
1690
1691 debug_log(DBG_PROCS, "Enter %s\n", __func__); 1687 debug_log(DBG_PROCS, "Enter %s\n", __func__);
1692 1688
1693 if (tape->nr_stages >= tape->max_stages) 1689 if (tape->nr_stages >= tape->max_stages)
1694 return NULL; 1690 return NULL;
1695 if (cache_stage != NULL) {
1696 tape->cache_stage = NULL;
1697 return cache_stage;
1698 }
1699 return __idetape_kmalloc_stage(tape, 0, 0); 1691 return __idetape_kmalloc_stage(tape, 0, 0);
1700} 1692}
1701 1693
@@ -3245,10 +3237,7 @@ static int idetape_chrdev_release(struct inode *inode, struct file *filp)
3245 else 3237 else
3246 idetape_wait_for_pipeline(drive); 3238 idetape_wait_for_pipeline(drive);
3247 } 3239 }
3248 if (tape->cache_stage != NULL) { 3240
3249 __idetape_kfree_stage(tape->cache_stage);
3250 tape->cache_stage = NULL;
3251 }
3252 if (minor < 128 && test_bit(IDETAPE_FLAG_MEDIUM_PRESENT, &tape->flags)) 3241 if (minor < 128 && test_bit(IDETAPE_FLAG_MEDIUM_PRESENT, &tape->flags))
3253 (void) idetape_rewind_tape(drive); 3242 (void) idetape_rewind_tape(drive);
3254 if (tape->chrdev_dir == IDETAPE_DIR_NONE) { 3243 if (tape->chrdev_dir == IDETAPE_DIR_NONE) {