ext4: fix fc_track_create call in ext4_create

In case of error, don't call ext4_fc_track_create().

BUG=b/180027487
TEST=Before this fix, generic/027 made the kernel crash. After the fix,
the kernel doesn't crash and the test passes.
RELEASE_NOTE=Fixed a kernel crash due to fast commit changes.
Signed-off-by: Harshad Shirwadkar <harshads@google.com>
Change-Id: Iaa777b73bcc330284053af6674dd9a26b3420b24
Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/12330
Reviewed-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index df25539..3eb1858 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2616,7 +2616,8 @@
 		err = ext4_add_nondir(handle, dentry, inode);
 		if (!err && IS_DIRSYNC(dir))
 			ext4_handle_sync(handle);
-		ext4_fc_track_create(handle, dentry);
+		if (!err)
+			ext4_fc_track_create(handle, dentry);
 	}
 	if (handle)
 		ext4_journal_stop(handle);