From 770ab47b0564ddbede0e42932e7e066a223584eb Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Wed, 20 Jan 2016 08:27:37 +0800 Subject: [PATCH] f2fs: remove needless condition check This patch removes needless condition variable. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 4a43dfb108d0..2f733e7cea6b 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -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;