]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: remove redundant variables from __process_folios_contig() and lock_delalloc_fo...
authorDavid Sterba <dsterba@suse.com>
Thu, 9 Jan 2025 10:24:45 +0000 (11:24 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:23 +0000 (14:53 +0100)
Same pattern in both functions, we really only use index, start_index is
redundant.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c

index d7a63b2e33b07c47531229eed28bcbd5f888dda9..c068a442753c595e51c3c5a8864bf1732e80acb4 100644 (file)
@@ -198,9 +198,8 @@ static void __process_folios_contig(struct address_space *mapping,
                                    u64 end, unsigned long page_ops)
 {
        struct btrfs_fs_info *fs_info = inode_to_fs_info(mapping->host);
-       pgoff_t start_index = start >> PAGE_SHIFT;
+       pgoff_t index = start >> PAGE_SHIFT;
        pgoff_t end_index = end >> PAGE_SHIFT;
-       pgoff_t index = start_index;
        struct folio_batch fbatch;
        int i;
 
@@ -242,9 +241,8 @@ static noinline int lock_delalloc_folios(struct inode *inode,
 {
        struct btrfs_fs_info *fs_info = inode_to_fs_info(inode);
        struct address_space *mapping = inode->i_mapping;
-       pgoff_t start_index = start >> PAGE_SHIFT;
+       pgoff_t index = start >> PAGE_SHIFT;
        pgoff_t end_index = end >> PAGE_SHIFT;
-       pgoff_t index = start_index;
        u64 processed_end = start;
        struct folio_batch fbatch;