]> git.baikalelectronics.ru Git - kernel.git/commit
pnfs/blocklayout: correctly decrement extent length
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Aug 2014 16:09:29 +0000 (11:09 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 10 Sep 2014 19:47:02 +0000 (12:47 -0700)
commit6adf2f245599d861129d349ecbab2f99528c0147
tree8efd8cfe55fa1e62de0a557c6d3579e99dc240b9
parentbb9af97a9c1125d3d820ff03d17979f8472bcef5
pnfs/blocklayout: correctly decrement extent length

When we do non-page sized reads we can underflow the extent_length variable
and read incorrect data.  Fix the extent_length calculation and change to
defensive <= checks for the extent length in the read and write path.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/blocklayout/blocklayout.c