aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-30 21:37:12 -0500
committerPaul Mackerras <paulus@samba.org>2005-10-30 21:37:12 -0500
commit23fd07750a789a66fe88cf173d52a18f1a387da4 (patch)
tree06fdd6df35fdb835abdaa9b754d62f6b84b97250 /drivers/scsi/st.c
parentbd787d438a59266af3c9f6351644c85ef1dd21fe (diff)
parented28f96ac1960f30f818374d65be71d2fdf811b0 (diff)
Merge ../linux-2.6 by hand
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r--drivers/scsi/st.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index d001c046551b..da9766283bd7 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -3577,7 +3577,8 @@ static long st_compat_ioctl(struct file *file, unsigned int cmd, unsigned long a
3577static struct st_buffer * 3577static struct st_buffer *
3578 new_tape_buffer(int from_initialization, int need_dma, int max_sg) 3578 new_tape_buffer(int from_initialization, int need_dma, int max_sg)
3579{ 3579{
3580 int i, priority, got = 0, segs = 0; 3580 int i, got = 0, segs = 0;
3581 gfp_t priority;
3581 struct st_buffer *tb; 3582 struct st_buffer *tb;
3582 3583
3583 if (from_initialization) 3584 if (from_initialization)
@@ -3610,7 +3611,8 @@ static struct st_buffer *
3610/* Try to allocate enough space in the tape buffer */ 3611/* Try to allocate enough space in the tape buffer */
3611static int enlarge_buffer(struct st_buffer * STbuffer, int new_size, int need_dma) 3612static int enlarge_buffer(struct st_buffer * STbuffer, int new_size, int need_dma)
3612{ 3613{
3613 int segs, nbr, max_segs, b_size, priority, order, got; 3614 int segs, nbr, max_segs, b_size, order, got;
3615 gfp_t priority;
3614 3616
3615 if (new_size <= STbuffer->buffer_size) 3617 if (new_size <= STbuffer->buffer_size)
3616 return 1; 3618 return 1;
@@ -4375,7 +4377,7 @@ static void do_create_class_files(struct scsi_tape *STp, int dev_num, int mode)
4375 snprintf(name, 10, "%s%s%s", rew ? "n" : "", 4377 snprintf(name, 10, "%s%s%s", rew ? "n" : "",
4376 STp->disk->disk_name, st_formats[i]); 4378 STp->disk->disk_name, st_formats[i]);
4377 st_class_member = 4379 st_class_member =
4378 class_device_create(st_sysfs_class, 4380 class_device_create(st_sysfs_class, NULL,
4379 MKDEV(SCSI_TAPE_MAJOR, 4381 MKDEV(SCSI_TAPE_MAJOR,
4380 TAPE_MINOR(dev_num, mode, rew)), 4382 TAPE_MINOR(dev_num, mode, rew)),
4381 &STp->device->sdev_gendev, "%s", name); 4383 &STp->device->sdev_gendev, "%s", name);
@@ -4524,12 +4526,16 @@ static int sgl_unmap_user_pages(struct scatterlist *sgl, const unsigned int nr_p
4524 int i; 4526 int i;
4525 4527
4526 for (i=0; i < nr_pages; i++) { 4528 for (i=0; i < nr_pages; i++) {
4527 if (dirtied && !PageReserved(sgl[i].page)) 4529 struct page *page = sgl[i].page;
4528 SetPageDirty(sgl[i].page); 4530
4531 /* XXX: just for debug. Remove when PageReserved is removed */
4532 BUG_ON(PageReserved(page));
4533 if (dirtied)
4534 SetPageDirty(page);
4529 /* FIXME: cache flush missing for rw==READ 4535 /* FIXME: cache flush missing for rw==READ
4530 * FIXME: call the correct reference counting function 4536 * FIXME: call the correct reference counting function
4531 */ 4537 */
4532 page_cache_release(sgl[i].page); 4538 page_cache_release(page);
4533 } 4539 }
4534 4540
4535 return 0; 4541 return 0;