mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-19 08:11:52 +00:00
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>
This commit is contained in:
parent
0c6c44cb9f
commit
7f00184e9c
@ -1029,12 +1029,12 @@ static __u64 nilfs_btree_find_target_v(const struct nilfs_bmap *btree,
|
|||||||
if (ptr != NILFS_BMAP_INVALID_PTR)
|
if (ptr != NILFS_BMAP_INVALID_PTR)
|
||||||
/* sequential access */
|
/* sequential access */
|
||||||
return ptr;
|
return ptr;
|
||||||
else {
|
|
||||||
ptr = nilfs_btree_find_near(btree, path);
|
ptr = nilfs_btree_find_near(btree, path);
|
||||||
if (ptr != NILFS_BMAP_INVALID_PTR)
|
if (ptr != NILFS_BMAP_INVALID_PTR)
|
||||||
/* near */
|
/* near */
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
|
||||||
/* block group */
|
/* block group */
|
||||||
return nilfs_bmap_find_target_in_group(btree);
|
return nilfs_bmap_find_target_in_group(btree);
|
||||||
}
|
}
|
||||||
|
@ -107,9 +107,9 @@ nilfs_direct_find_target_v(const struct nilfs_bmap *direct, __u64 key)
|
|||||||
if (ptr != NILFS_BMAP_INVALID_PTR)
|
if (ptr != NILFS_BMAP_INVALID_PTR)
|
||||||
/* sequential access */
|
/* sequential access */
|
||||||
return ptr;
|
return ptr;
|
||||||
else
|
|
||||||
/* block group */
|
/* block group */
|
||||||
return nilfs_bmap_find_target_in_group(direct);
|
return nilfs_bmap_find_target_in_group(direct);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr)
|
static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr)
|
||||||
|
@ -150,17 +150,15 @@ static int nilfs_prepare_segment_lock(struct nilfs_transaction_info *ti)
|
|||||||
if (cur_ti) {
|
if (cur_ti) {
|
||||||
if (cur_ti->ti_magic == NILFS_TI_MAGIC)
|
if (cur_ti->ti_magic == NILFS_TI_MAGIC)
|
||||||
return ++cur_ti->ti_count;
|
return ++cur_ti->ti_count;
|
||||||
else {
|
|
||||||
/*
|
/*
|
||||||
* If journal_info field is occupied by other FS,
|
* If journal_info field is occupied by other FS,
|
||||||
* it is saved and will be restored on
|
* it is saved and will be restored on
|
||||||
* nilfs_transaction_commit().
|
* nilfs_transaction_commit().
|
||||||
*/
|
*/
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
"NILFS warning: journal info from a different "
|
"NILFS warning: journal info from a different FS\n");
|
||||||
"FS\n");
|
save = current->journal_info;
|
||||||
save = current->journal_info;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!ti) {
|
if (!ti) {
|
||||||
ti = kmem_cache_alloc(nilfs_transaction_cachep, GFP_NOFS);
|
ti = kmem_cache_alloc(nilfs_transaction_cachep, GFP_NOFS);
|
||||||
@ -2552,10 +2550,10 @@ static int nilfs_segctor_thread(void *arg)
|
|||||||
|
|
||||||
if (timeout || sci->sc_seq_request != sci->sc_seq_done)
|
if (timeout || sci->sc_seq_request != sci->sc_seq_done)
|
||||||
mode = SC_LSEG_SR;
|
mode = SC_LSEG_SR;
|
||||||
else if (!sci->sc_flush_request)
|
else if (sci->sc_flush_request)
|
||||||
break;
|
|
||||||
else
|
|
||||||
mode = nilfs_segctor_flush_mode(sci);
|
mode = nilfs_segctor_flush_mode(sci);
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
|
||||||
spin_unlock(&sci->sc_state_lock);
|
spin_unlock(&sci->sc_state_lock);
|
||||||
nilfs_segctor_thread_construct(sci, mode);
|
nilfs_segctor_thread_construct(sci, mode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user