summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c38
1 files changed, 3 insertions, 35 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index bc1027ce0d1f..3c4e7edec1f6 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -909,7 +909,6 @@ xfs_dir_ialloc(
prid_t prid,
struct xfs_inode **ipp)
{
- struct xfs_buf *ialloc_context = NULL;
xfs_ino_t parent_ino = dp ? dp->i_ino : 0;
xfs_ino_t ino;
int error;
@@ -918,43 +917,12 @@ xfs_dir_ialloc(
/*
* Call the space management code to pick the on-disk inode to be
- * allocated and replenish the freelist. Since we can only do one
- * allocation per transaction without deadlocks, we will need to
- * commit the current transaction and start a new one.
- * If xfs_dialloc did an allocation to replenish the freelist, it
- * returns the bp containing the head of the freelist as
- * ialloc_context. We will hold a lock on it across the transaction
- * commit so that no other process can steal the inode(s) that we've
- * just allocated.
- */
- error = xfs_dialloc(*tpp, parent_ino, mode, &ialloc_context, &ino);
+ * allocated.
+ */
+ error = xfs_dialloc(tpp, parent_ino, mode, &ino);
if (error)
return error;
- /*
- * If the AGI buffer is non-NULL, then we were unable to get an
- * inode in one operation. We need to commit the current
- * transaction and call xfs_dialloc() again. It is guaranteed
- * to succeed the second time.
- */
- if (ialloc_context) {
- error = xfs_dialloc_roll(tpp, ialloc_context);
- if (error) {
- xfs_buf_relse(ialloc_context);
- return error;
- }
- /*
- * Call dialloc again. Since we've locked out all other
- * allocations in this allocation group, this call should
- * always succeed.
- */
- error = xfs_dialloc(*tpp, parent_ino, mode, &ialloc_context,
- &ino);
- if (error)
- return error;
- ASSERT(!ialloc_context);
- }
-
if (ino == NULLFSINO)
return -ENOSPC;