Skip to content

Commit

Permalink
nilfs2: Remove the unneeded result variable
Browse files Browse the repository at this point in the history
Return the value nilfs_segctor_sync() directly instead of storing it in
another redundant variable.

Link: https://lkml.kernel.org/r/20220831033403.302184-1-ye.xingchen@zte.com.cn
Link: https://lkml.kernel.org/r/20220921034803.2476-3-konishi.ryusuke@gmail.com
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
ye xingchen authored and Andrew Morton committed Sep 27, 2022
1 parent 29ff8d7 commit e87d069
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/nilfs2/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -2235,16 +2235,14 @@ int nilfs_construct_segment(struct super_block *sb)
struct the_nilfs *nilfs = sb->s_fs_info;
struct nilfs_sc_info *sci = nilfs->ns_writer;
struct nilfs_transaction_info *ti;
int err;

if (!sci)
return -EROFS;

/* A call inside transactions causes a deadlock. */
BUG_ON((ti = current->journal_info) && ti->ti_magic == NILFS_TI_MAGIC);

err = nilfs_segctor_sync(sci);
return err;
return nilfs_segctor_sync(sci);
}

/**
Expand Down

0 comments on commit e87d069

Please sign in to comment.