projects
/
profile
/
common
/
kernel-common.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
|
history
diff --git
a/fs/btrfs/file.c
b/fs/btrfs/file.c
index
20452c1
..
fa48051
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);