Re: [PATCH] Btrfs: fix off-by-one in lseek

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 09, 2013 at 12:34:45PM +0800, Liu Bo wrote:
> Thanks for coding this up, I've checked the code, these messages can
> be fixed by the following, please check if it works on your side :)
> 
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index 1b319df..1688669 100644
> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -3895,7 +3913,7 @@ int extent_fiemap(struct inode *inode, struct
> fiemap_extent_info *fieinfo,
>  		last_for_get_extent = isize;
>  	}
>  
> -	lock_extent_bits(&BTRFS_I(inode)->io_tree, start, start + len, 0,
> +	lock_extent_bits(&BTRFS_I(inode)->io_tree, start, start + len - 1, 0,
>  			 &cached_state);
>  
>  	em = get_extent_skip_holes(inode, start, last_for_get_extent,
> @@ -3982,7 +4000,7 @@ int extent_fiemap(struct inode *inode, struct
> fiemap_extent_info *fieinfo,
>  out_free:
>  	free_extent_map(em);
>  out:
> -	unlock_extent_cached(&BTRFS_I(inode)->io_tree, start, start + len,
> +	unlock_extent_cached(&BTRFS_I(inode)->io_tree, start, start + len - 1,
>  			     &cached_state, GFP_NOFS);
>  	return ret;
>  }

can you please resend this as a proper patch? I'm sending the debugging
helper and found out that this is still not fixed. You can add my

Tested-by: David Sterba <dsterba@xxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux