aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/osd/osd_initiator.c6
-rw-r--r--fs/exofs/inode.c3
-rw-r--r--include/scsi/osd_initiator.h5
3 files changed, 9 insertions, 5 deletions
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
index 3f5ec578e6c6..3959797149fd 100644
--- a/drivers/scsi/osd/osd_initiator.c
+++ b/drivers/scsi/osd/osd_initiator.c
@@ -670,7 +670,7 @@ static int _osd_req_list_objects(struct osd_request *or,
670 __be16 action, const struct osd_obj_id *obj, osd_id initial_id, 670 __be16 action, const struct osd_obj_id *obj, osd_id initial_id,
671 struct osd_obj_id_list *list, unsigned nelem) 671 struct osd_obj_id_list *list, unsigned nelem)
672{ 672{
673 struct request_queue *q = or->osd_dev->scsi_device->request_queue; 673 struct request_queue *q = osd_request_queue(or->osd_dev);
674 u64 len = nelem * sizeof(osd_id) + sizeof(*list); 674 u64 len = nelem * sizeof(osd_id) + sizeof(*list);
675 struct bio *bio; 675 struct bio *bio;
676 676
@@ -793,7 +793,7 @@ EXPORT_SYMBOL(osd_req_write);
793int osd_req_write_kern(struct osd_request *or, 793int osd_req_write_kern(struct osd_request *or,
794 const struct osd_obj_id *obj, u64 offset, void* buff, u64 len) 794 const struct osd_obj_id *obj, u64 offset, void* buff, u64 len)
795{ 795{
796 struct request_queue *req_q = or->osd_dev->scsi_device->request_queue; 796 struct request_queue *req_q = osd_request_queue(or->osd_dev);
797 struct bio *bio = bio_map_kern(req_q, buff, len, GFP_KERNEL); 797 struct bio *bio = bio_map_kern(req_q, buff, len, GFP_KERNEL);
798 798
799 if (IS_ERR(bio)) 799 if (IS_ERR(bio))
@@ -844,7 +844,7 @@ EXPORT_SYMBOL(osd_req_read);
844int osd_req_read_kern(struct osd_request *or, 844int osd_req_read_kern(struct osd_request *or,
845 const struct osd_obj_id *obj, u64 offset, void* buff, u64 len) 845 const struct osd_obj_id *obj, u64 offset, void* buff, u64 len)
846{ 846{
847 struct request_queue *req_q = or->osd_dev->scsi_device->request_queue; 847 struct request_queue *req_q = osd_request_queue(or->osd_dev);
848 struct bio *bio = bio_map_kern(req_q, buff, len, GFP_KERNEL); 848 struct bio *bio = bio_map_kern(req_q, buff, len, GFP_KERNEL);
849 849
850 if (IS_ERR(bio)) 850 if (IS_ERR(bio))
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index f79e8e58c3a2..77d0a295eb1c 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -59,10 +59,9 @@ static void _pcol_init(struct page_collect *pcol, unsigned expected_pages,
59 struct inode *inode) 59 struct inode *inode)
60{ 60{
61 struct exofs_sb_info *sbi = inode->i_sb->s_fs_info; 61 struct exofs_sb_info *sbi = inode->i_sb->s_fs_info;
62 struct request_queue *req_q = sbi->s_dev->scsi_device->request_queue;
63 62
64 pcol->sbi = sbi; 63 pcol->sbi = sbi;
65 pcol->req_q = req_q; 64 pcol->req_q = osd_request_queue(sbi->s_dev);
66 pcol->inode = inode; 65 pcol->inode = inode;
67 pcol->expected_pages = expected_pages; 66 pcol->expected_pages = expected_pages;
68 67
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h
index 8c1e3b804afd..b44dc53bd881 100644
--- a/include/scsi/osd_initiator.h
+++ b/include/scsi/osd_initiator.h
@@ -18,6 +18,7 @@
18#include "osd_types.h" 18#include "osd_types.h"
19 19
20#include <linux/blkdev.h> 20#include <linux/blkdev.h>
21#include <scsi/scsi_device.h>
21 22
22/* Note: "NI" in comments below means "Not Implemented yet" */ 23/* Note: "NI" in comments below means "Not Implemented yet" */
23 24
@@ -69,6 +70,10 @@ void osd_dev_fini(struct osd_dev *od);
69 70
70/* some hi level device operations */ 71/* some hi level device operations */
71int osd_auto_detect_ver(struct osd_dev *od, void *caps); /* GFP_KERNEL */ 72int osd_auto_detect_ver(struct osd_dev *od, void *caps); /* GFP_KERNEL */
73static inline struct request_queue *osd_request_queue(struct osd_dev *od)
74{
75 return od->scsi_device->request_queue;
76}
72 77
73/* we might want to use function vector in the future */ 78/* we might want to use function vector in the future */
74static inline void osd_dev_set_ver(struct osd_dev *od, enum osd_std_version v) 79static inline void osd_dev_set_ver(struct osd_dev *od, enum osd_std_version v)