mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-14 09:47:20 +00:00
SG: clear termination bit in sg_chain()
Since we are using the last entry in the list, clear any possible termination bit that may have already been set. Pointed out by Rusty. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
2a397e82c7
commit
73fd546aa7
@ -179,7 +179,11 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
|
|||||||
#ifndef ARCH_HAS_SG_CHAIN
|
#ifndef ARCH_HAS_SG_CHAIN
|
||||||
BUG();
|
BUG();
|
||||||
#endif
|
#endif
|
||||||
prv[prv_nents - 1].page_link = (unsigned long) sgl | 0x01;
|
/*
|
||||||
|
* Set lowest bit to indicate a link pointer, and make sure to clear
|
||||||
|
* the termination bit if it happens to be set.
|
||||||
|
*/
|
||||||
|
prv[prv_nents - 1].page_link = ((unsigned long) sgl | 0x01) & ~0x02;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user