Skip to contentSkip to conversation

f2fs: Change the type of f2fs_flush_inline_data() to void

PATCH In review Jia Yang 2 participants 2 messages Jul 21, 2020 – Jul 24, 2020 F2FS file system

lore
Share & tools
lore

Jia Yang

author
#0 lore raw

PATCH 1/1 f2fs: Change the type of f2fs_flush_inline_data() to void

The return value of f2fs_flush_inline_data() is not used, so delete it.

---
 fs/f2fs/f2fs.h | 2 +-
 fs/f2fs/node.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
fs/f2fs/f2fs.h +1 -1
index b35a50f4953c..cf808aa749bc 100644
@@ -3275,7 +3275,7 @@ void f2fs_ra_node_page(struct f2fs_sb_info *sbi, nid_t nid);
 struct page *f2fs_get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid);
 struct page *f2fs_get_node_page_ra(struct page *parent, int start);
 int f2fs_move_node_page(struct page *node_page, int gc_type);
-int f2fs_flush_inline_data(struct f2fs_sb_info *sbi);
+void f2fs_flush_inline_data(struct f2fs_sb_info *sbi);
 int f2fs_fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode,
 			struct writeback_control *wbc, bool atomic,
 			unsigned int *seq_id);
fs/f2fs/node.c +1 -3
index 03e24df1c84f..6a95bbcb8313 100644
@@ -1814,12 +1814,11 @@ static bool flush_dirty_inode(struct page *page)
 	return true;
 }
 
-int f2fs_flush_inline_data(struct f2fs_sb_info *sbi)
+void f2fs_flush_inline_data(struct f2fs_sb_info *sbi)
 {
 	pgoff_t index = 0;
 	struct pagevec pvec;
 	int nr_pages;
-	int ret = 0;
 
 	pagevec_init(&pvec);
 
@@ -1858,7 +1857,6 @@ int f2fs_flush_inline_data(struct f2fs_sb_info *sbi)
 		pagevec_release(&pvec);
 		cond_resched();
 	}
-	return ret;
 }
 
 int f2fs_sync_node_pages(struct f2fs_sb_info *sbi,
Signature · 8 lines
2.26.0.106.g9fadedd



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jia Yang

The return value of f2fs_flush_inline_data() is not used, so delete it.

The patch looks good to me, however f2fs_flush_inline_data() should be reverted, so let's see...

Thanks,

Quoted 38 lines
---
  fs/f2fs/f2fs.h | 2 +-
  fs/f2fs/node.c | 4 +---
  2 files changed, 2 insertions(+), 4 deletions(-)
fs/f2fs/f2fs.h +1 -1
index b35a50f4953c..cf808aa749bc 100644
@@ -3275,7 +3275,7 @@ void f2fs_ra_node_page(struct f2fs_sb_info *sbi, nid_t nid);
  struct page *f2fs_get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid);
  struct page *f2fs_get_node_page_ra(struct page *parent, int start);
  int f2fs_move_node_page(struct page *node_page, int gc_type);
-int f2fs_flush_inline_data(struct f2fs_sb_info *sbi);
+void f2fs_flush_inline_data(struct f2fs_sb_info *sbi);
  int f2fs_fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode,
  			struct writeback_control *wbc, bool atomic,
  			unsigned int *seq_id);
fs/f2fs/node.c +1 -2
index 03e24df1c84f..6a95bbcb8313 100644
@@ -1814,12 +1814,11 @@ static bool flush_dirty_inode(struct page *page)
  	return true;
  }
 
-int f2fs_flush_inline_data(struct f2fs_sb_info *sbi)
+void f2fs_flush_inline_data(struct f2fs_sb_info *sbi)
  {
  	pgoff_t index = 0;
  	struct pagevec pvec;
  	int nr_pages;
-	int ret = 0;
 
  	pagevec_init(&pvec);
 

fs/f2fs/node.c int f2fs_flush_inline_data(struct f2fs_sb_info *sbi) · line 1862

Quoted 7 lines
fs/f2fs/node.c +0 -1
@@ -1858,7 +1857,6 @@ int f2fs_flush_inline_data(struct f2fs_sb_info *sbi)
  		pagevec_release(&pvec);
  		cond_resched();
  	}
-	return ret;
  }
 
  int f2fs_sync_node_pages(struct f2fs_sb_info *sbi,

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel