Skip to content

Commit 0c3a38a

Browse files
henryZeJaegeuk Kim
authored andcommitted
f2fs: Fix not used variable 'index'
Fix the following compilation warning: fs/f2fs/data.c:2391:10: warning: variable ‘index’ set but not used [-Wunused-but-set-variable] 2391 | pgoff_t index; Only define and set the variable index when the CONFIG_F2FS_FS_COMPRESSION is enabled. Fixes: db92e6c ("f2fs: convert f2fs_mpage_readpages() to use folio") Signed-off-by: Zeng Heng <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent e63ce12 commit 0c3a38a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/f2fs/data.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,10 +2385,10 @@ static int f2fs_mpage_readpages(struct inode *inode,
23852385
.nr_cpages = 0,
23862386
};
23872387
pgoff_t nc_cluster_idx = NULL_CLUSTER;
2388+
pgoff_t index;
23882389
#endif
23892390
unsigned nr_pages = rac ? readahead_count(rac) : 1;
23902391
unsigned max_nr_pages = nr_pages;
2391-
pgoff_t index;
23922392
int ret = 0;
23932393

23942394
map.m_pblk = 0;
@@ -2406,9 +2406,9 @@ static int f2fs_mpage_readpages(struct inode *inode,
24062406
prefetchw(&folio->flags);
24072407
}
24082408

2409+
#ifdef CONFIG_F2FS_FS_COMPRESSION
24092410
index = folio_index(folio);
24102411

2411-
#ifdef CONFIG_F2FS_FS_COMPRESSION
24122412
if (!f2fs_compressed_file(inode))
24132413
goto read_single_page;
24142414

0 commit comments

Comments
 (0)