diff options
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r-- | drivers/scsi/st.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 2913f8792317..6b85f84c8397 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -4374,7 +4374,7 @@ static void do_create_class_files(struct scsi_tape *STp, int dev_num, int mode) | |||
4374 | snprintf(name, 10, "%s%s%s", rew ? "n" : "", | 4374 | snprintf(name, 10, "%s%s%s", rew ? "n" : "", |
4375 | STp->disk->disk_name, st_formats[i]); | 4375 | STp->disk->disk_name, st_formats[i]); |
4376 | st_class_member = | 4376 | st_class_member = |
4377 | class_device_create(st_sysfs_class, | 4377 | class_device_create(st_sysfs_class, NULL, |
4378 | MKDEV(SCSI_TAPE_MAJOR, | 4378 | MKDEV(SCSI_TAPE_MAJOR, |
4379 | TAPE_MINOR(dev_num, mode, rew)), | 4379 | TAPE_MINOR(dev_num, mode, rew)), |
4380 | &STp->device->sdev_gendev, "%s", name); | 4380 | &STp->device->sdev_gendev, "%s", name); |
@@ -4523,12 +4523,16 @@ static int sgl_unmap_user_pages(struct scatterlist *sgl, const unsigned int nr_p | |||
4523 | int i; | 4523 | int i; |
4524 | 4524 | ||
4525 | for (i=0; i < nr_pages; i++) { | 4525 | for (i=0; i < nr_pages; i++) { |
4526 | if (dirtied && !PageReserved(sgl[i].page)) | 4526 | struct page *page = sgl[i].page; |
4527 | SetPageDirty(sgl[i].page); | 4527 | |
4528 | /* XXX: just for debug. Remove when PageReserved is removed */ | ||
4529 | BUG_ON(PageReserved(page)); | ||
4530 | if (dirtied) | ||
4531 | SetPageDirty(page); | ||
4528 | /* FIXME: cache flush missing for rw==READ | 4532 | /* FIXME: cache flush missing for rw==READ |
4529 | * FIXME: call the correct reference counting function | 4533 | * FIXME: call the correct reference counting function |
4530 | */ | 4534 | */ |
4531 | page_cache_release(sgl[i].page); | 4535 | page_cache_release(page); |
4532 | } | 4536 | } |
4533 | 4537 | ||
4534 | return 0; | 4538 | return 0; |