diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index aa1016b..b79e726 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c @@ -390,29 +390,13 @@ _xfs_buf_lookup_pages( retry: page = find_or_create_page(mapping, first + i, gfp_mask); if (unlikely(page == NULL)) { - if (flags & XBF_READ_AHEAD) { - bp->b_page_count = i; - for (i = 0; i < bp->b_page_count; i++) - unlock_page(bp->b_pages[i]); - return -ENOMEM; - } + printk(KERN_EMERG "XFS couldn't find_or_create_page()\n"); + WARN_ON_ONCE(1); - /* - * This could deadlock. - * - * But until all the XFS lowlevel code is revamped to - * handle buffer allocation failures we can't do much. - */ - if (!(++retries % 100)) - printk(KERN_ERR - "XFS: possible memory allocation " - "deadlock in %s (mode:0x%x)\n", - __func__, gfp_mask); - - XFS_STATS_INC(xb_page_retries); - xfsbufd_wakeup(0, gfp_mask); - congestion_wait(WRITE, HZ/50); - goto retry; + bp->b_page_count = i; + for (i = 0; i < bp->b_page_count; i++) + unlock_page(bp->b_pages[i]); + return -ENOMEM; } XFS_STATS_INC(xb_page_found);