]> 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)
commita55ea519e0971297075f77fcb314590b7e53b3f5
tree8efd8cfe55fa1e62de0a557c6d3579e99dc240b9
parent81343c585732bc7201b3ca544bd1dd93fca67d2b
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