f2fs: cleanup the f2fs_bio_alloc routine
Do cleanup more for better code readability. - Change the parameter set of f2fs_bio_alloc() This function should allocate a bio only since it is not something like f2fs_bio_init(). Instead, the caller should initialize the allocated bio. - Introduce SECTOR_FROM_BLOCK This macro translates a block address to its sector address. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com> Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com>
This commit is contained in:
@@ -924,7 +924,7 @@ void clear_prefree_segments(struct f2fs_sb_info *);
|
||||
int npages_for_summary_flush(struct f2fs_sb_info *);
|
||||
void allocate_new_segments(struct f2fs_sb_info *);
|
||||
struct page *get_sum_page(struct f2fs_sb_info *, unsigned int);
|
||||
struct bio *f2fs_bio_alloc(struct block_device *, sector_t, int, gfp_t);
|
||||
struct bio *f2fs_bio_alloc(struct block_device *, int);
|
||||
void f2fs_submit_bio(struct f2fs_sb_info *, enum page_type, bool sync);
|
||||
int write_meta_page(struct f2fs_sb_info *, struct page *,
|
||||
struct writeback_control *);
|
||||
|
Reference in New Issue
Block a user