Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106143
b: refs/heads/master
c: a76eef9
h: refs/heads/master
i:
  106141: c48f2a8
  106139: a0b4afd
  106135: 6d3db9f
  106127: c649998
  106111: 36bd3db
v: v3
  • Loading branch information
FUJITA Tomonori authored and Linus Torvalds committed Jul 26, 2008
1 parent 0c02fff commit 93b3f55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2e2e3577c3ef2b5dbb866e97e612aae4adfa32f
refs/heads/master: a76eef9573c93f8f324ebacfd090a3e319a64d59
8 changes: 2 additions & 6 deletions trunk/block/blk-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
int reading = rq_data_dir(rq) == READ;
int do_copy = 0;
struct bio *bio;
unsigned long stack_mask = ~(THREAD_SIZE - 1);

if (len > (q->max_hw_sectors << 9))
return -EINVAL;
Expand All @@ -278,11 +277,8 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,

kaddr = (unsigned long)kbuf;
alignment = queue_dma_alignment(q) | q->dma_pad_mask;
do_copy = ((kaddr & alignment) || (len & alignment));

if (!((kaddr & stack_mask) ^
((unsigned long)current->stack & stack_mask)))
do_copy = 1;
do_copy = ((kaddr & alignment) || (len & alignment) ||
object_is_on_stack(kbuf));

if (do_copy)
bio = bio_copy_kern(q, kbuf, len, gfp_mask, reading);
Expand Down

0 comments on commit 93b3f55

Please sign in to comment.