diff options
author | Dave Chinner <dchinner@redhat.com> | 2012-04-23 01:58:56 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-05-14 17:20:52 -0400 |
commit | aa5c158ec97bd4014f47a2bc0150fb6b20e6c48b (patch) | |
tree | 8c79791167a5d659949952ad11a08ce325eb025c /fs/xfs/xfs_vnodeops.c | |
parent | 7ca790a507a9288ebedab90a8e40b9afa8e4e949 (diff) |
xfs: kill XBF_DONTBLOCK
Just about all callers of xfs_buf_read() and xfs_buf_get() use XBF_DONTBLOCK.
This is used to make memory allocation use GFP_NOFS rather than GFP_KERNEL to
avoid recursion through memory reclaim back into the filesystem.
All the blocking get calls in growfs occur inside a transaction, even though
they are no part of the transaction, so all allocation will be GFP_NOFS due to
the task flag PF_TRANS being set. The blocking read calls occur during log
recovery, so they will probably be unaffected by converting to GFP_NOFS
allocations.
Hence make XBF_DONTBLOCK behaviour always occur for buffers and kill the flag.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 8f99c7781f39..6c187450f1c8 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -82,7 +82,7 @@ xfs_readlink_bmap( | |||
82 | byte_cnt = XFS_FSB_TO_B(mp, mval[n].br_blockcount); | 82 | byte_cnt = XFS_FSB_TO_B(mp, mval[n].br_blockcount); |
83 | 83 | ||
84 | bp = xfs_buf_read(mp->m_ddev_targp, d, BTOBB(byte_cnt), | 84 | bp = xfs_buf_read(mp->m_ddev_targp, d, BTOBB(byte_cnt), |
85 | XBF_MAPPED | XBF_DONT_BLOCK); | 85 | XBF_MAPPED); |
86 | if (!bp) | 86 | if (!bp) |
87 | return XFS_ERROR(ENOMEM); | 87 | return XFS_ERROR(ENOMEM); |
88 | error = bp->b_error; | 88 | error = bp->b_error; |
@@ -1966,7 +1966,7 @@ xfs_zero_remaining_bytes( | |||
1966 | 1966 | ||
1967 | bp = xfs_buf_get_uncached(XFS_IS_REALTIME_INODE(ip) ? | 1967 | bp = xfs_buf_get_uncached(XFS_IS_REALTIME_INODE(ip) ? |
1968 | mp->m_rtdev_targp : mp->m_ddev_targp, | 1968 | mp->m_rtdev_targp : mp->m_ddev_targp, |
1969 | BTOBB(mp->m_sb.sb_blocksize), XBF_DONT_BLOCK); | 1969 | BTOBB(mp->m_sb.sb_blocksize), 0); |
1970 | if (!bp) | 1970 | if (!bp) |
1971 | return XFS_ERROR(ENOMEM); | 1971 | return XFS_ERROR(ENOMEM); |
1972 | 1972 | ||