]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - fs/btrfs/file.c
Btrfs: fix off-by-one in lseek
[~shefty/rdma-dev.git] / fs / btrfs / file.c
index 20452c110d7d4e1ce96db6b6af2f4c797c2c1e63..fa48051484b87192f3d4e14dce90deb40e90f9e6 100644 (file)
@@ -2242,6 +2242,7 @@ static int find_desired_extent(struct inode *inode, loff_t *offset, int origin)
        if (lockend <= lockstart)
                lockend = lockstart + root->sectorsize;
 
+       lockend--;
        len = lockend - lockstart + 1;
 
        len = max_t(u64, len, root->sectorsize);