diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2013-01-07 04:53:08 +0100 |
---|---|---|
committer | Josef Bacik <josef@toxicpanda.com> | 2013-01-14 19:53:22 +0100 |
commit | 1214b53f90131fee1f950010c43e92455fe598ab (patch) | |
tree | d2c3c55c3f86f539013fbbee2980f13ac312fb7d /fs/btrfs | |
parent | Btrfs: reset path lock state to zero (diff) | |
download | linux-1214b53f90131fee1f950010c43e92455fe598ab.tar.xz linux-1214b53f90131fee1f950010c43e92455fe598ab.zip |
Btrfs: fix off-by-one in lseek
Lock end is inclusive.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 20452c110d7d..fa48051484b8 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -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); |