diff options
author | Gao Xiang <gaoxiang25@huawei.com> | 2018-12-08 00:19:13 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-07 17:10:48 +0100 |
commit | c1448fa88025872502c3f7bf2cf7365deb25bb1b (patch) | |
tree | e80c0fbb6fe88ee6800596cf6f0fbf1883f0f394 /drivers/staging/erofs/internal.h | |
parent | 848bd9acdcd00c164b42b14aacec242949ecd471 (diff) | |
download | linux-c1448fa88025872502c3f7bf2cf7365deb25bb1b.tar.bz2 |
staging: erofs: introduce MNGD_MAPPING helper
This patch introduces MNGD_MAPPING to wrap up
sbi->managed_cache->i_mapping, which will be used
to solve too many #ifdefs in a single function.
No logic changes.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/erofs/internal.h')
-rw-r--r-- | drivers/staging/erofs/internal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h index 892944355867..b78d6e4c12ab 100644 --- a/drivers/staging/erofs/internal.h +++ b/drivers/staging/erofs/internal.h @@ -295,6 +295,10 @@ extern int erofs_try_to_free_all_cached_pages(struct erofs_sb_info *sbi, struct erofs_workgroup *egrp); extern int erofs_try_to_free_cached_page(struct address_space *mapping, struct page *page); + +#define MNGD_MAPPING(sbi) ((sbi)->managed_cache->i_mapping) +#else +#define MNGD_MAPPING(sbi) (NULL) #endif #define DEFAULT_MAX_SYNC_DECOMPRESS_PAGES 3 |