Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Browse files Browse the repository at this point in the history
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  sg: disable interrupts inside sg_copy_buffer
  • Loading branch information
Linus Torvalds committed Sep 11, 2008
2 parents d1c6d2e + 50bed2e commit a551b98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/scatterlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,12 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents,
{
unsigned int offset = 0;
struct sg_mapping_iter miter;
unsigned long flags;

sg_miter_start(&miter, sgl, nents, SG_MITER_ATOMIC);

local_irq_save(flags);

while (sg_miter_next(&miter) && offset < buflen) {
unsigned int len;

Expand All @@ -442,6 +445,7 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents,

sg_miter_stop(&miter);

local_irq_restore(flags);
return offset;
}

Expand Down

0 comments on commit a551b98

Please sign in to comment.