Skip to content

Commit ef8c004

Browse files
committed
btrfs: remove redundant variables from __process_folios_contig() and lock_delalloc_folios()
Same pattern in both functions, we really only use index, start_index is redundant. Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Anand Jain <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 248c4ff commit ef8c004

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fs/btrfs/extent_io.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,8 @@ static void __process_folios_contig(struct address_space *mapping,
198198
u64 end, unsigned long page_ops)
199199
{
200200
struct btrfs_fs_info *fs_info = inode_to_fs_info(mapping->host);
201-
pgoff_t start_index = start >> PAGE_SHIFT;
201+
pgoff_t index = start >> PAGE_SHIFT;
202202
pgoff_t end_index = end >> PAGE_SHIFT;
203-
pgoff_t index = start_index;
204203
struct folio_batch fbatch;
205204
int i;
206205

@@ -242,9 +241,8 @@ static noinline int lock_delalloc_folios(struct inode *inode,
242241
{
243242
struct btrfs_fs_info *fs_info = inode_to_fs_info(inode);
244243
struct address_space *mapping = inode->i_mapping;
245-
pgoff_t start_index = start >> PAGE_SHIFT;
244+
pgoff_t index = start >> PAGE_SHIFT;
246245
pgoff_t end_index = end >> PAGE_SHIFT;
247-
pgoff_t index = start_index;
248246
u64 processed_end = start;
249247
struct folio_batch fbatch;
250248

0 commit comments

Comments
 (0)