diff options
author | Christoph Hellwig <hch@infradead.org> | 2009-07-18 18:15:00 -0400 |
---|---|---|
committer | Felix Blyakher <felixb@sgi.com> | 2009-08-11 10:54:31 -0500 |
commit | 5a25f1abb26f5ab7c6c72fe0b3807c137ee484bb (patch) | |
tree | 39e9baefba57271355de675e5dc4a2bcf815023b | |
parent | f56ebd66df411446030e2cc820554c6ce4ba0836 (diff) | |
download | linux-5a25f1abb26f5ab7c6c72fe0b3807c137ee484bb.tar.gz linux-5a25f1abb26f5ab7c6c72fe0b3807c137ee484bb.tar.bz2 linux-5a25f1abb26f5ab7c6c72fe0b3807c137ee484bb.zip |
xfs: switch to NOFS allocation under i_lock in xfs_readlink_bmap
xfs_readlink_bmap is 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>
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 1dd706887156..ceecafd1f9c1 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c @@ -538,7 +538,9 @@ xfs_readlink_bmap( d = XFS_FSB_TO_DADDR(mp, mval[n].br_startblock); byte_cnt = XFS_FSB_TO_B(mp, mval[n].br_blockcount); - bp = xfs_buf_read(mp->m_ddev_targp, d, BTOBB(byte_cnt), 0); + bp = xfs_buf_read_flags(mp->m_ddev_targp, d, BTOBB(byte_cnt), + XBF_LOCK | XBF_MAPPED | + XBF_DONT_BLOCK); error = XFS_BUF_GETERROR(bp); if (error) { xfs_ioerror_alert("xfs_readlink", |