aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_ialloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc.c')
-rw-r--r--fs/xfs/libxfs/xfs_ialloc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
index de3f04a98656..3b57ef0f2f76 100644
--- a/fs/xfs/libxfs/xfs_ialloc.c
+++ b/fs/xfs/libxfs/xfs_ialloc.c
@@ -920,8 +920,7 @@ STATIC xfs_agnumber_t
920xfs_ialloc_ag_select( 920xfs_ialloc_ag_select(
921 xfs_trans_t *tp, /* transaction pointer */ 921 xfs_trans_t *tp, /* transaction pointer */
922 xfs_ino_t parent, /* parent directory inode number */ 922 xfs_ino_t parent, /* parent directory inode number */
923 umode_t mode, /* bits set to indicate file type */ 923 umode_t mode) /* bits set to indicate file type */
924 int okalloc) /* ok to allocate more space */
925{ 924{
926 xfs_agnumber_t agcount; /* number of ag's in the filesystem */ 925 xfs_agnumber_t agcount; /* number of ag's in the filesystem */
927 xfs_agnumber_t agno; /* current ag number */ 926 xfs_agnumber_t agno; /* current ag number */
@@ -978,9 +977,6 @@ xfs_ialloc_ag_select(
978 return agno; 977 return agno;
979 } 978 }
980 979
981 if (!okalloc)
982 goto nextag;
983
984 if (!pag->pagf_init) { 980 if (!pag->pagf_init) {
985 error = xfs_alloc_pagf_init(mp, tp, agno, flags); 981 error = xfs_alloc_pagf_init(mp, tp, agno, flags);
986 if (error) 982 if (error)
@@ -1680,7 +1676,6 @@ xfs_dialloc(
1680 struct xfs_trans *tp, 1676 struct xfs_trans *tp,
1681 xfs_ino_t parent, 1677 xfs_ino_t parent,
1682 umode_t mode, 1678 umode_t mode,
1683 int okalloc,
1684 struct xfs_buf **IO_agbp, 1679 struct xfs_buf **IO_agbp,
1685 xfs_ino_t *inop) 1680 xfs_ino_t *inop)
1686{ 1681{
@@ -1692,6 +1687,7 @@ xfs_dialloc(
1692 int noroom = 0; 1687 int noroom = 0;
1693 xfs_agnumber_t start_agno; 1688 xfs_agnumber_t start_agno;
1694 struct xfs_perag *pag; 1689 struct xfs_perag *pag;
1690 int okalloc = 1;
1695 1691
1696 if (*IO_agbp) { 1692 if (*IO_agbp) {
1697 /* 1693 /*
@@ -1707,7 +1703,7 @@ xfs_dialloc(
1707 * We do not have an agbp, so select an initial allocation 1703 * We do not have an agbp, so select an initial allocation
1708 * group for inode allocation. 1704 * group for inode allocation.
1709 */ 1705 */
1710 start_agno = xfs_ialloc_ag_select(tp, parent, mode, okalloc); 1706 start_agno = xfs_ialloc_ag_select(tp, parent, mode);
1711 if (start_agno == NULLAGNUMBER) { 1707 if (start_agno == NULLAGNUMBER) {
1712 *inop = NULLFSINO; 1708 *inop = NULLFSINO;
1713 return 0; 1709 return 0;