xfs: Remove duplicate jumps to the same label
authorJan Kara <jack@suse.com>
Wed, 29 Jul 2015 01:52:08 +0000 (11:52 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 29 Jul 2015 01:52:08 +0000 (11:52 +1000)
xfs_create() and xfs_create_tmpfile() have useless jumps to identical
labels. Simplify them.

Signed-off-by: Jan Kara <jack@suse.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_inode.c

index 3da9f4da4f3d2e6b67ffd1bd752b4b0993af9fda..d22a984d8470d8538b44bdd3e312eb7be11403c4 100644 (file)
@@ -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);