xfs: switch to NOFS allocation under i_lock in xfs_attr_rmtval_get

xfs_attr_rmtval_get is always called with i_lock held, but i_lock is taken
in reclaim context so all allocations under it must avoid recursions into
the filesystem.

Reported by the new reclaim context tracing in lockdep.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>

authored by Christoph Hellwig and committed by Felix Blyakher ddd3a14e 7b02ecb3

+3 -1
+3 -1
fs/xfs/xfs_attr.c
··· 2010 2010 dblkno = XFS_FSB_TO_DADDR(mp, map[i].br_startblock); 2011 2011 blkcnt = XFS_FSB_TO_BB(mp, map[i].br_blockcount); 2012 2012 error = xfs_read_buf(mp, mp->m_ddev_targp, dblkno, 2013 - blkcnt, XFS_BUF_LOCK, &bp); 2013 + blkcnt, 2014 + XFS_BUF_LOCK | XBF_DONT_BLOCK, 2015 + &bp); 2014 2016 if (error) 2015 2017 return(error); 2016 2018