diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-31 12:06:37 +0100 |
---|---|---|
committer | Jens Axboe <axboe@carl.home.kernel.dk> | 2007-11-02 08:47:06 +0100 |
commit | c46f2334c84c2b26baa64d42d75ddc5fab38c3dc (patch) | |
tree | 4d7800effffe61bd3eaeae8f13e44466e4818b36 /drivers/scsi | |
parent | 87ae9afdcada236d0a1b38ce2c465a65916961dc (diff) | |
download | kernel_samsung_tuna-c46f2334c84c2b26baa64d42d75ddc5fab38c3dc.zip kernel_samsung_tuna-c46f2334c84c2b26baa64d42d75ddc5fab38c3dc.tar.gz kernel_samsung_tuna-c46f2334c84c2b26baa64d42d75ddc5fab38c3dc.tar.bz2 |
[SG] Get rid of __sg_mark_end()
sg_mark_end() overwrites the page_link information, but all users want
__sg_mark_end() behaviour where we just set the end bit. That is the most
natural way to use the sg list, since you'll fill it in and then mark the
end point.
So change sg_mark_end() to only set the termination bit. Add a sg_magic
debug check as well, and clear a chain pointer if it is set.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 61fdaf0..88de771 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -785,7 +785,7 @@ struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, gfp_t gfp_mask) * end-of-list */ if (!left) - sg_mark_end(sgl, this); + sg_mark_end(&sgl[this - 1]); /* * don't allow subsequent mempool allocs to sleep, it would |