diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2016-05-23 19:23:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-23 20:04:14 -0400 |
commit | 7f00184e9cb534aca1f10f3027cb6137b03f101e (patch) | |
tree | b0f6548012480e0e3cc269da3b04be2fc2c145b6 | |
parent | 0c6c44cb9f93f7c0ad803b41ae7c0b08cf6942e2 (diff) |
nilfs2: remove unnecessary else after return or break
This fixes the checkpatch.pl warning that suggests else is not
generally useful after a break or return.
Link: http://lkml.kernel.org/r/1462886671-3521-6-git-send-email-konishi.ryusuke@lab.ntt.co.jp
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/nilfs2/btree.c | 12 | ||||
-rw-r--r-- | fs/nilfs2/direct.c | 6 | ||||
-rw-r--r-- | fs/nilfs2/segment.c | 26 |
3 files changed, 21 insertions, 23 deletions
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index 57ec6af28b49..eccb1c89ccbb 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c | |||
@@ -1029,12 +1029,12 @@ static __u64 nilfs_btree_find_target_v(const struct nilfs_bmap *btree, | |||
1029 | if (ptr != NILFS_BMAP_INVALID_PTR) | 1029 | if (ptr != NILFS_BMAP_INVALID_PTR) |
1030 | /* sequential access */ | 1030 | /* sequential access */ |
1031 | return ptr; | 1031 | return ptr; |
1032 | else { | 1032 | |
1033 | ptr = nilfs_btree_find_near(btree, path); | 1033 | ptr = nilfs_btree_find_near(btree, path); |
1034 | if (ptr != NILFS_BMAP_INVALID_PTR) | 1034 | if (ptr != NILFS_BMAP_INVALID_PTR) |
1035 | /* near */ | 1035 | /* near */ |
1036 | return ptr; | 1036 | return ptr; |
1037 | } | 1037 | |
1038 | /* block group */ | 1038 | /* block group */ |
1039 | return nilfs_bmap_find_target_in_group(btree); | 1039 | return nilfs_bmap_find_target_in_group(btree); |
1040 | } | 1040 | } |
diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c index 001068630063..251a44928405 100644 --- a/fs/nilfs2/direct.c +++ b/fs/nilfs2/direct.c | |||
@@ -107,9 +107,9 @@ nilfs_direct_find_target_v(const struct nilfs_bmap *direct, __u64 key) | |||
107 | if (ptr != NILFS_BMAP_INVALID_PTR) | 107 | if (ptr != NILFS_BMAP_INVALID_PTR) |
108 | /* sequential access */ | 108 | /* sequential access */ |
109 | return ptr; | 109 | return ptr; |
110 | else | 110 | |
111 | /* block group */ | 111 | /* block group */ |
112 | return nilfs_bmap_find_target_in_group(direct); | 112 | return nilfs_bmap_find_target_in_group(direct); |
113 | } | 113 | } |
114 | 114 | ||
115 | static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) | 115 | static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) |
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 97dee069be83..c9ee03c262ea 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -150,17 +150,15 @@ static int nilfs_prepare_segment_lock(struct nilfs_transaction_info *ti) | |||
150 | if (cur_ti) { | 150 | if (cur_ti) { |
151 | if (cur_ti->ti_magic == NILFS_TI_MAGIC) | 151 | if (cur_ti->ti_magic == NILFS_TI_MAGIC) |
152 | return ++cur_ti->ti_count; | 152 | return ++cur_ti->ti_count; |
153 | else { | 153 | |
154 | /* | 154 | /* |
155 | * If journal_info field is occupied by other FS, | 155 | * If journal_info field is occupied by other FS, |
156 | * it is saved and will be restored on | 156 | * it is saved and will be restored on |
157 | * nilfs_transaction_commit(). | 157 | * nilfs_transaction_commit(). |
158 | */ | 158 | */ |
159 | printk(KERN_WARNING | 159 | printk(KERN_WARNING |
160 | "NILFS warning: journal info from a different " | 160 | "NILFS warning: journal info from a different FS\n"); |
161 | "FS\n"); | 161 | save = current->journal_info; |
162 | save = current->journal_info; | ||
163 | } | ||
164 | } | 162 | } |
165 | if (!ti) { | 163 | if (!ti) { |
166 | ti = kmem_cache_alloc(nilfs_transaction_cachep, GFP_NOFS); | 164 | ti = kmem_cache_alloc(nilfs_transaction_cachep, GFP_NOFS); |
@@ -2552,10 +2550,10 @@ static int nilfs_segctor_thread(void *arg) | |||
2552 | 2550 | ||
2553 | if (timeout || sci->sc_seq_request != sci->sc_seq_done) | 2551 | if (timeout || sci->sc_seq_request != sci->sc_seq_done) |
2554 | mode = SC_LSEG_SR; | 2552 | mode = SC_LSEG_SR; |
2555 | else if (!sci->sc_flush_request) | 2553 | else if (sci->sc_flush_request) |
2556 | break; | ||
2557 | else | ||
2558 | mode = nilfs_segctor_flush_mode(sci); | 2554 | mode = nilfs_segctor_flush_mode(sci); |
2555 | else | ||
2556 | break; | ||
2559 | 2557 | ||
2560 | spin_unlock(&sci->sc_state_lock); | 2558 | spin_unlock(&sci->sc_state_lock); |
2561 | nilfs_segctor_thread_construct(sci, mode); | 2559 | nilfs_segctor_thread_construct(sci, mode); |