diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 0969b83eb55f85f9173fd2021da404c2624abda5..020b5ace62840e323583f3ab7846a9708904a9c9 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2288,11 +2288,10 @@ static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname,
 						   (frame - 1)->bh);
 			if (err)
 				goto journal_error;
-			if (restart) {
-				err = ext4_handle_dirty_dx_node(handle, dir,
-							   frame->bh);
+			err = ext4_handle_dirty_dx_node(handle, dir,
+							frame->bh);
+			if (err)
 				goto journal_error;
-			}
 		} else {
 			struct dx_root *dxroot;
 			memcpy((char *) entries2, (char *) entries,