projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3268a24
)
Btrfs: fix off-by-one in lseek
author
Liu Bo
<bo.li.liu@oracle.com>
Mon, 7 Jan 2013 03:53:08 +0000
(
03:53
+0000)
committer
Josef Bacik
<josef@toxicpanda.com>
Mon, 14 Jan 2013 18:53:22 +0000
(13:53 -0500)
Lock end is inclusive.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/file.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/file.c
b/fs/btrfs/file.c
index 20452c110d7d4e1ce96db6b6af2f4c797c2c1e63..fa48051484b87192f3d4e14dce90deb40e90f9e6 100644
(file)
--- 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);