f2fs: Fix not used variable 'index'
[ Upstream commit 0c3a38a4b442893f8baca72e44a2a27d52d6cc75 ]
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: db92e6c729 ("f2fs: convert f2fs_mpage_readpages() to use folio")
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
abfd2c13ba
commit
5e69964251
+2
-2
@@ -2385,10 +2385,10 @@ static int f2fs_mpage_readpages(struct inode *inode,
|
|||||||
.nr_cpages = 0,
|
.nr_cpages = 0,
|
||||||
};
|
};
|
||||||
pgoff_t nc_cluster_idx = NULL_CLUSTER;
|
pgoff_t nc_cluster_idx = NULL_CLUSTER;
|
||||||
|
pgoff_t index;
|
||||||
#endif
|
#endif
|
||||||
unsigned nr_pages = rac ? readahead_count(rac) : 1;
|
unsigned nr_pages = rac ? readahead_count(rac) : 1;
|
||||||
unsigned max_nr_pages = nr_pages;
|
unsigned max_nr_pages = nr_pages;
|
||||||
pgoff_t index;
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
map.m_pblk = 0;
|
map.m_pblk = 0;
|
||||||
@@ -2406,9 +2406,9 @@ static int f2fs_mpage_readpages(struct inode *inode,
|
|||||||
prefetchw(&folio->flags);
|
prefetchw(&folio->flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_F2FS_FS_COMPRESSION
|
||||||
index = folio_index(folio);
|
index = folio_index(folio);
|
||||||
|
|
||||||
#ifdef CONFIG_F2FS_FS_COMPRESSION
|
|
||||||
if (!f2fs_compressed_file(inode))
|
if (!f2fs_compressed_file(inode))
|
||||||
goto read_single_page;
|
goto read_single_page;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user