linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs: fix off-by-one in lseek
@ 2013-01-07  3:53 Liu Bo
  2013-01-07 16:20 ` David Sterba
  0 siblings, 1 reply; 14+ messages in thread
From: Liu Bo @ 2013-01-07  3:53 UTC (permalink / raw)
  To: linux-btrfs

Lock end is inclusive.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
 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 77061bf..1e16b6d 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2241,6 +2241,7 @@ static int find_desired_extent(struct inode *inode, loff_t *offset, int whence)
 	if (lockend <= lockstart)
 		lockend = lockstart + root->sectorsize;
 
+	lockend--;
 	len = lockend - lockstart + 1;
 
 	len = max_t(u64, len, root->sectorsize);
-- 
1.7.7.6


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-04-30 14:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07  3:53 [PATCH] Btrfs: fix off-by-one in lseek Liu Bo
2013-01-07 16:20 ` David Sterba
2013-01-08  2:46   ` Liu Bo
2013-01-08  8:30     ` David Sterba
2013-01-08 17:26       ` David Sterba
2013-01-09  4:34         ` Liu Bo
2013-01-09 11:50           ` David Sterba
2013-01-09 12:49             ` David Sterba
2013-01-10  2:17             ` Liu Bo
2013-01-10 11:04               ` David Sterba
2013-01-10 13:34                 ` Liu Bo
2013-01-11 15:25                   ` David Sterba
2013-01-11 17:49                     ` David Sterba
2013-04-30 14:28           ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).