summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@titanic.(none)>2005-09-06 17:52:54 -0500
committerJames Bottomley <jejb@titanic.(none)>2005-09-06 17:52:54 -0500
commit17fa53da1239b8712c5cebbd72a74c713b6c2db9 (patch)
tree8cf55e47ce681a6c899ccf8e06abeccecb20d38b /drivers/scsi/st.c
parent3173d8c342971a03857d8af749a3f57da7d06b57 (diff)
parentfe1b2d544d71300f8e2d151c3c77a130d13a58be (diff)
downloadblackbird-obmc-linux-17fa53da1239b8712c5cebbd72a74c713b6c2db9.tar.gz
blackbird-obmc-linux-17fa53da1239b8712c5cebbd72a74c713b6c2db9.zip
Merge by hand (conflicts in sd.c)
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r--drivers/scsi/st.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 9aadf2fcad6a..a93308ae9736 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -17,7 +17,7 @@
Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
*/
-static char *verstr = "20050802";
+static char *verstr = "20050830";
#include <linux/module.h>
@@ -4440,12 +4440,12 @@ static int st_map_user_pages(struct scatterlist *sgl, const unsigned int max_pag
static int sgl_map_user_pages(struct scatterlist *sgl, const unsigned int max_pages,
unsigned long uaddr, size_t count, int rw)
{
+ unsigned long end = (uaddr + count + PAGE_SIZE - 1) >> PAGE_SHIFT;
+ unsigned long start = uaddr >> PAGE_SHIFT;
+ const int nr_pages = end - start;
int res, i, j;
- unsigned int nr_pages;
struct page **pages;
- nr_pages = ((uaddr & ~PAGE_MASK) + count + ~PAGE_MASK) >> PAGE_SHIFT;
-
/* User attempted Overflow! */
if ((uaddr + count) < uaddr)
return -EINVAL;
OpenPOWER on IntegriCloud