Skip to content

Commit cc2c39d

Browse files
Johannes Thumshirnkdave
authored andcommitted
btrfs: don't initialize 'offset' in map_private_extent_buffer()
In map_private_extent_buffer() the 'offset' variable is initialized to a page aligned version of the 'start' parameter. But later on it is overwritten with either the offset from the extent buffer's start or 0. So get rid of the initial initialization. Reviewed-by: Nikolay Borisov <[email protected]> Signed-off-by: Johannes Thumshirn <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent a5fb114 commit cc2c39d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/extent_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5380,7 +5380,7 @@ int map_private_extent_buffer(const struct extent_buffer *eb,
53805380
char **map, unsigned long *map_start,
53815381
unsigned long *map_len)
53825382
{
5383-
size_t offset = start & (PAGE_SIZE - 1);
5383+
size_t offset;
53845384
char *kaddr;
53855385
struct page *p;
53865386
size_t start_offset = eb->start & ((u64)PAGE_SIZE - 1);

0 commit comments

Comments
 (0)