Skip to content

Commit

Permalink
Btrfs: cleanup unused cached_state in __extent_writepage_io
Browse files Browse the repository at this point in the history
@cached_state is no more required in __extent_writepage_io, also remove
the goto label.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Liu Bo authored and David Sterba committed Feb 14, 2017
1 parent 003d7c5 commit bcf9348
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -3335,7 +3335,6 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,
u64 block_start;
u64 iosize;
sector_t sector;
struct extent_state *cached_state = NULL;
struct extent_map *em;
struct block_device *bdev;
size_t pg_offset = 0;
Expand All @@ -3356,8 +3355,7 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,

update_nr_written(page, wbc, nr_written);
unlock_page(page);
ret = 1;
goto done_unlocked;
return 1;
}
}

Expand Down Expand Up @@ -3459,11 +3457,6 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,
}
done:
*nr_ret = nr;

done_unlocked:

/* drop our reference on any cached states */
free_extent_state(cached_state);
return ret;
}

Expand Down

0 comments on commit bcf9348

Please sign in to comment.