提交 d6077aa3 编写于 作者: J Jan Kara 提交者: Dave Chinner

xfs: Remove duplicate jumps to the same label

xfs_create() and xfs_create_tmpfile() have useless jumps to identical
labels. Simplify them.
Signed-off-by: NJan Kara <jack@suse.com>
Reviewed-by: NDave Chinner <dchinner@redhat.com>
Signed-off-by: NDave Chinner <david@fromorbit.com>
上级 f41febd2
......@@ -1175,11 +1175,8 @@ xfs_create(
*/
error = xfs_dir_ialloc(&tp, dp, mode, is_dir ? 2 : 1, rdev,
prid, resblks > 0, &ip, &committed);
if (error) {
if (error == -ENOSPC)
goto out_trans_cancel;
if (error)
goto out_trans_cancel;
}
/*
* Now we join the directory inode to the transaction. We do not do it
......@@ -1318,11 +1315,8 @@ xfs_create_tmpfile(
error = xfs_dir_ialloc(&tp, dp, mode, 1, 0,
prid, resblks > 0, &ip, NULL);
if (error) {
if (error == -ENOSPC)
goto out_trans_cancel;
if (error)
goto out_trans_cancel;
}
if (mp->m_flags & XFS_MOUNT_WSYNC)
xfs_trans_set_sync(tp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册