Skip to contentSkip to conversation

f2fs: cleanup the needless return of f2fs_create_root_stats

PATCH New Gu Zheng 1 participant 2 messages Jul 11, 2014 F2FS file system

lore
Share & tools
lore

Gu Zheng

author
#0 lore raw

PATCH 1/2 f2fs: cleanup the needless return of f2fs_create_root_stats

---
 fs/f2fs/debug.c |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)
fs/f2fs/debug.c +5 -12
index b52c12c..3f99266 100644
@@ -345,21 +345,14 @@ void __init f2fs_create_root_stats(void)
 
 	f2fs_debugfs_root = debugfs_create_dir("f2fs", NULL);
 	if (!f2fs_debugfs_root)
-		goto bail;
+		return;
 
 	file = debugfs_create_file("status", S_IRUGO, f2fs_debugfs_root,
 			NULL, &stat_fops);
-	if (!file)
-		goto free_debugfs_dir;
-
-	return;
-
-free_debugfs_dir:
-	debugfs_remove(f2fs_debugfs_root);
-
-bail:
-	f2fs_debugfs_root = NULL;
-	return;
+	if (!file) {
+		debugfs_remove(f2fs_debugfs_root);
+		f2fs_debugfs_root = NULL;
+	}
 }
 
 void f2fs_destroy_root_stats(void)
Signature · 9 lines
1.7.7


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
author
#1 lore raw

PATCH 2/2 f2fs: remove the unused stat_lock

---
 fs/f2fs/f2fs.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
fs/f2fs/f2fs.h +0 -1
index ae3b4ac..8f507d4 100644
@@ -1298,7 +1298,6 @@ bool space_for_roll_forward(struct f2fs_sb_info *);
 struct f2fs_stat_info {
 	struct list_head stat_list;
 	struct f2fs_sb_info *sbi;
-	struct mutex stat_lock;
 	int all_area_segs, sit_area_segs, nat_area_segs, ssa_area_segs;
 	int main_area_segs, main_area_sections, main_area_zones;
 	int hit_ext, total_ext;
Signature · 9 lines
1.7.7


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft