Skip to content

Commit

Permalink
f2fs: remove needless condition check
Browse files Browse the repository at this point in the history
This patch removes needless condition variable.

Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
Jaegeuk Kim authored and TheScarastic committed May 21, 2017
1 parent 1c842b1 commit 770ab47
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fs/f2fs/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -1487,13 +1487,9 @@ static int prepare_write_begin(struct f2fs_sb_info *sbi,
if (f2fs_lookup_extent_cache(inode, index, &ei)) {
dn.data_blkaddr = ei.blk + index - ei.fofs;
} else {
bool restart = false;

/* hole case */
err = get_dnode_of_data(&dn, index, LOOKUP_NODE);
if (err || (!err && dn.data_blkaddr == NULL_ADDR))
restart = true;
if (restart) {
if (err || (!err && dn.data_blkaddr == NULL_ADDR)) {
f2fs_put_dnode(&dn);
f2fs_lock_op(sbi);
locked = true;
Expand Down

0 comments on commit 770ab47

Please sign in to comment.