Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78efd1dd authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: fix spin_is_locked assert on uni-processor builds
  xfs: check for dinode realtime flag corruption
  use XFS_CORRUPTION_ERROR in xfs_btree_check_sblock
  xfs: switch to NOFS allocation under i_lock in xfs_attr_rmtval_get
  xfs: switch to NOFS allocation under i_lock in xfs_readlink_bmap
  xfs: switch to NOFS allocation under i_lock in xfs_attr_rmtval_set
  xfs: switch to NOFS allocation under i_lock in xfs_buf_associate_memory
  xfs: switch to NOFS allocation under i_lock in xfs_dir_cilookup_result
  xfs: switch to NOFS allocation under i_lock in xfs_da_buf_make
  xfs: switch to NOFS allocation under i_lock in xfs_da_state_alloc
  xfs: switch to NOFS allocation under i_lock in xfs_getbmap
  xfs: avoid memory allocation under m_peraglock in growfs code
parents b637dc0d a8914f3a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -770,7 +770,7 @@ xfs_buf_associate_memory(
	bp->b_pages = NULL;
	bp->b_pages = NULL;
	bp->b_addr = mem;
	bp->b_addr = mem;


	rval = _xfs_buf_get_pages(bp, page_count, 0);
	rval = _xfs_buf_get_pages(bp, page_count, XBF_DONT_BLOCK);
	if (rval)
	if (rval)
		return rval;
		return rval;


+5 −3
Original line number Original line Diff line number Diff line
@@ -2010,7 +2010,9 @@ xfs_attr_rmtval_get(xfs_da_args_t *args)
			dblkno = XFS_FSB_TO_DADDR(mp, map[i].br_startblock);
			dblkno = XFS_FSB_TO_DADDR(mp, map[i].br_startblock);
			blkcnt = XFS_FSB_TO_BB(mp, map[i].br_blockcount);
			blkcnt = XFS_FSB_TO_BB(mp, map[i].br_blockcount);
			error = xfs_read_buf(mp, mp->m_ddev_targp, dblkno,
			error = xfs_read_buf(mp, mp->m_ddev_targp, dblkno,
					     blkcnt, XFS_BUF_LOCK, &bp);
					     blkcnt,
					     XFS_BUF_LOCK | XBF_DONT_BLOCK,
					     &bp);
			if (error)
			if (error)
				return(error);
				return(error);


@@ -2141,8 +2143,8 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
		dblkno = XFS_FSB_TO_DADDR(mp, map.br_startblock),
		dblkno = XFS_FSB_TO_DADDR(mp, map.br_startblock),
		blkcnt = XFS_FSB_TO_BB(mp, map.br_blockcount);
		blkcnt = XFS_FSB_TO_BB(mp, map.br_blockcount);


		bp = xfs_buf_get_flags(mp->m_ddev_targp, dblkno,
		bp = xfs_buf_get_flags(mp->m_ddev_targp, dblkno, blkcnt,
							blkcnt, XFS_BUF_LOCK);
				       XFS_BUF_LOCK | XBF_DONT_BLOCK);
		ASSERT(bp);
		ASSERT(bp);
		ASSERT(!XFS_BUF_GETERROR(bp));
		ASSERT(!XFS_BUF_GETERROR(bp));


+1 −1
Original line number Original line Diff line number Diff line
@@ -6009,7 +6009,7 @@ xfs_getbmap(
	 */
	 */
	error = ENOMEM;
	error = ENOMEM;
	subnex = 16;
	subnex = 16;
	map = kmem_alloc(subnex * sizeof(*map), KM_MAYFAIL);
	map = kmem_alloc(subnex * sizeof(*map), KM_MAYFAIL | KM_NOFS);
	if (!map)
	if (!map)
		goto out_unlock_ilock;
		goto out_unlock_ilock;


+2 −2
Original line number Original line Diff line number Diff line
@@ -120,8 +120,8 @@ xfs_btree_check_sblock(
			XFS_RANDOM_BTREE_CHECK_SBLOCK))) {
			XFS_RANDOM_BTREE_CHECK_SBLOCK))) {
		if (bp)
		if (bp)
			xfs_buftrace("SBTREE ERROR", bp);
			xfs_buftrace("SBTREE ERROR", bp);
		XFS_ERROR_REPORT("xfs_btree_check_sblock", XFS_ERRLEVEL_LOW,
		XFS_CORRUPTION_ERROR("xfs_btree_check_sblock",
				 cur->bc_mp);
			XFS_ERRLEVEL_LOW, cur->bc_mp, block);
		return XFS_ERROR(EFSCORRUPTED);
		return XFS_ERROR(EFSCORRUPTED);
	}
	}
	return 0;
	return 0;
+3 −3
Original line number Original line Diff line number Diff line
@@ -2201,7 +2201,7 @@ kmem_zone_t *xfs_dabuf_zone; /* dabuf zone */
xfs_da_state_t *
xfs_da_state_t *
xfs_da_state_alloc(void)
xfs_da_state_alloc(void)
{
{
	return kmem_zone_zalloc(xfs_da_state_zone, KM_SLEEP);
	return kmem_zone_zalloc(xfs_da_state_zone, KM_NOFS);
}
}


/*
/*
@@ -2261,9 +2261,9 @@ xfs_da_buf_make(int nbuf, xfs_buf_t **bps, inst_t *ra)
	int		off;
	int		off;


	if (nbuf == 1)
	if (nbuf == 1)
		dabuf = kmem_zone_alloc(xfs_dabuf_zone, KM_SLEEP);
		dabuf = kmem_zone_alloc(xfs_dabuf_zone, KM_NOFS);
	else
	else
		dabuf = kmem_alloc(XFS_DA_BUF_SIZE(nbuf), KM_SLEEP);
		dabuf = kmem_alloc(XFS_DA_BUF_SIZE(nbuf), KM_NOFS);
	dabuf->dirty = 0;
	dabuf->dirty = 0;
#ifdef XFS_DABUF_DEBUG
#ifdef XFS_DABUF_DEBUG
	dabuf->ra = ra;
	dabuf->ra = ra;
Loading