xfs: Remove duplicate jumps to the same label
PATCH 1/1 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 Jan Kara <[email protected]>
--- fs/xfs/xfs_inode.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
fs/xfs/xfs_inode.c +2 -8
@@ -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);
Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 5 lines · Jan Kara
xfs_create()andxfs_create_tmpfile()have useless jumps to identical labels. Simplify them.Signed-off-by Jan Kara <[email protected]>---
Reviewed-by Brian Foster <[email protected]>
Quoted 40 lines
fs/xfs/xfs_inode.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)fs/xfs/xfs_inode.c +2
-8@@ -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);Signature · 6 lines
2.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs