Skip to content

Commit 5e30c23

Browse files
Christoph Hellwigdjwong
authored andcommitted
xfs: don't fail xfs_extent_busy allocation
We don't just need the structure to track busy extents which can be avoided with a synchronous transaction, but also to keep track of pending discard. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
1 parent b20fe47 commit 5e30c23

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

fs/xfs/xfs_extent_busy.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,7 @@ xfs_extent_busy_insert(
4545
struct rb_node **rbp;
4646
struct rb_node *parent = NULL;
4747

48-
new = kmem_zalloc(sizeof(struct xfs_extent_busy), KM_MAYFAIL);
49-
if (!new) {
50-
/*
51-
* No Memory! Since it is now not possible to track the free
52-
* block, make this a synchronous transaction to insure that
53-
* the block is not reused before this transaction commits.
54-
*/
55-
trace_xfs_extent_busy_enomem(tp->t_mountp, agno, bno, len);
56-
xfs_trans_set_sync(tp);
57-
return;
58-
}
59-
48+
new = kmem_zalloc(sizeof(struct xfs_extent_busy), KM_SLEEP);
6049
new->agno = agno;
6150
new->bno = bno;
6251
new->length = len;

0 commit comments

Comments
 (0)