commit | 1214b53f90131fee1f950010c43e92455fe598ab | [log] [tgz] |
---|---|---|
author | Liu Bo <bo.li.liu@oracle.com> | Mon Jan 07 03:53:08 2013 +0000 |
committer | Josef Bacik <josef@toxicpanda.com> | Mon Jan 14 13:53:22 2013 -0500 |
tree | d2c3c55c3f86f539013fbbee2980f13ac312fb7d | |
parent | 3268a2468eb6a31af89930cbae58a62fe6ca6d2d [diff] [blame] |
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>
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 20452c1..fa48051 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c
@@ -2242,6 +2242,7 @@ if (lockend <= lockstart) lockend = lockstart + root->sectorsize; + lockend--; len = lockend - lockstart + 1; len = max_t(u64, len, root->sectorsize);