aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2014-06-22 01:04:54 -0400
committerDave Chinner <david@fromorbit.com>2014-06-22 01:04:54 -0400
commitb474c7ae4395ba684e85fde8f55c8cf44a39afaf (patch)
treea7d3cad895a9e1f14894710b43e9ccbf634da3f1 /fs/xfs/xfs_ialloc.c
parentd99831ff393ff2e28d6110b41f24d9fecf986222 (diff)
xfs: Nuke XFS_ERROR macro
XFS_ERROR was designed long ago to trap return values, but it's not runtime configurable, it's not consistently used, and we can do similar error trapping with ftrace scripts and triggers from userspace. Just nuke XFS_ERROR and associated bits. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
-rw-r--r--fs/xfs/xfs_ialloc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 5960e5593fe0..16fb63a9bc5e 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -380,7 +380,7 @@ xfs_ialloc_ag_alloc(
380 newlen = args.mp->m_ialloc_inos; 380 newlen = args.mp->m_ialloc_inos;
381 if (args.mp->m_maxicount && 381 if (args.mp->m_maxicount &&
382 args.mp->m_sb.sb_icount + newlen > args.mp->m_maxicount) 382 args.mp->m_sb.sb_icount + newlen > args.mp->m_maxicount)
383 return XFS_ERROR(ENOSPC); 383 return ENOSPC;
384 args.minlen = args.maxlen = args.mp->m_ialloc_blks; 384 args.minlen = args.maxlen = args.mp->m_ialloc_blks;
385 /* 385 /*
386 * First try to allocate inodes contiguous with the last-allocated 386 * First try to allocate inodes contiguous with the last-allocated
@@ -1425,7 +1425,7 @@ out_alloc:
1425 return xfs_dialloc_ag(tp, agbp, parent, inop); 1425 return xfs_dialloc_ag(tp, agbp, parent, inop);
1426out_error: 1426out_error:
1427 xfs_perag_put(pag); 1427 xfs_perag_put(pag);
1428 return XFS_ERROR(error); 1428 return error;
1429} 1429}
1430 1430
1431STATIC int 1431STATIC int
@@ -1682,7 +1682,7 @@ xfs_difree(
1682 xfs_warn(mp, "%s: agno >= mp->m_sb.sb_agcount (%d >= %d).", 1682 xfs_warn(mp, "%s: agno >= mp->m_sb.sb_agcount (%d >= %d).",
1683 __func__, agno, mp->m_sb.sb_agcount); 1683 __func__, agno, mp->m_sb.sb_agcount);
1684 ASSERT(0); 1684 ASSERT(0);
1685 return XFS_ERROR(EINVAL); 1685 return EINVAL;
1686 } 1686 }
1687 agino = XFS_INO_TO_AGINO(mp, inode); 1687 agino = XFS_INO_TO_AGINO(mp, inode);
1688 if (inode != XFS_AGINO_TO_INO(mp, agno, agino)) { 1688 if (inode != XFS_AGINO_TO_INO(mp, agno, agino)) {
@@ -1690,14 +1690,14 @@ xfs_difree(
1690 __func__, (unsigned long long)inode, 1690 __func__, (unsigned long long)inode,
1691 (unsigned long long)XFS_AGINO_TO_INO(mp, agno, agino)); 1691 (unsigned long long)XFS_AGINO_TO_INO(mp, agno, agino));
1692 ASSERT(0); 1692 ASSERT(0);
1693 return XFS_ERROR(EINVAL); 1693 return EINVAL;
1694 } 1694 }
1695 agbno = XFS_AGINO_TO_AGBNO(mp, agino); 1695 agbno = XFS_AGINO_TO_AGBNO(mp, agino);
1696 if (agbno >= mp->m_sb.sb_agblocks) { 1696 if (agbno >= mp->m_sb.sb_agblocks) {
1697 xfs_warn(mp, "%s: agbno >= mp->m_sb.sb_agblocks (%d >= %d).", 1697 xfs_warn(mp, "%s: agbno >= mp->m_sb.sb_agblocks (%d >= %d).",
1698 __func__, agbno, mp->m_sb.sb_agblocks); 1698 __func__, agbno, mp->m_sb.sb_agblocks);
1699 ASSERT(0); 1699 ASSERT(0);
1700 return XFS_ERROR(EINVAL); 1700 return EINVAL;
1701 } 1701 }
1702 /* 1702 /*
1703 * Get the allocation group header. 1703 * Get the allocation group header.
@@ -1829,7 +1829,7 @@ xfs_imap(
1829 * as they can be invalid without implying corruption. 1829 * as they can be invalid without implying corruption.
1830 */ 1830 */
1831 if (flags & XFS_IGET_UNTRUSTED) 1831 if (flags & XFS_IGET_UNTRUSTED)
1832 return XFS_ERROR(EINVAL); 1832 return EINVAL;
1833 if (agno >= mp->m_sb.sb_agcount) { 1833 if (agno >= mp->m_sb.sb_agcount) {
1834 xfs_alert(mp, 1834 xfs_alert(mp,
1835 "%s: agno (%d) >= mp->m_sb.sb_agcount (%d)", 1835 "%s: agno (%d) >= mp->m_sb.sb_agcount (%d)",
@@ -1849,7 +1849,7 @@ xfs_imap(
1849 } 1849 }
1850 xfs_stack_trace(); 1850 xfs_stack_trace();
1851#endif /* DEBUG */ 1851#endif /* DEBUG */
1852 return XFS_ERROR(EINVAL); 1852 return EINVAL;
1853 } 1853 }
1854 1854
1855 blks_per_cluster = xfs_icluster_size_fsb(mp); 1855 blks_per_cluster = xfs_icluster_size_fsb(mp);
@@ -1922,7 +1922,7 @@ out_map:
1922 __func__, (unsigned long long) imap->im_blkno, 1922 __func__, (unsigned long long) imap->im_blkno,
1923 (unsigned long long) imap->im_len, 1923 (unsigned long long) imap->im_len,
1924 XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks)); 1924 XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks));
1925 return XFS_ERROR(EINVAL); 1925 return EINVAL;
1926 } 1926 }
1927 return 0; 1927 return 0;
1928} 1928}