diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-12 23:43:01 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-12 23:43:01 -0400 |
| commit | e68ff9cd15552e46e0f993eace25af0947b1222d (patch) | |
| tree | 28873106aa1c88963a13b34a4bc209875763a4e4 /fs/xfs/xfs_vnodeops.c | |
| parent | c44efbaa0ef3cf53fbf6bb57c33d4f199b15f2da (diff) | |
| parent | e570280521290c27621d60cffea2400bdf1f2c88 (diff) | |
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
xfs: replace xfs_buf_geterror() with bp->b_error
xfs: Check the return value of xfs_buf_read() for NULL
"xfs: fix error handling for synchronous writes" revisited
xfs: set cursor in xfs_ail_splice() even when AIL was empty
xfs: Remove the macro XFS_BUFTARG_NAME
xfs: Remove the macro XFS_BUF_TARGET
xfs: Remove the macro XFS_BUF_SET_TARGET
Replace the macro XFS_BUF_ISPINNED with helper xfs_buf_ispinned
xfs: Remove the macro XFS_BUF_SET_PTR
xfs: Remove the macro XFS_BUF_PTR
xfs: Remove macro XFS_BUF_SET_START
xfs: Remove macro XFS_BUF_HOLD
xfs: Remove macro XFS_BUF_BUSY and family
xfs: Remove the macro XFS_BUF_ERROR and family
xfs: Remove the macro XFS_BUF_BFLAGS
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
| -rw-r--r-- | fs/xfs/xfs_vnodeops.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 9322e13f0c63..51fc429527bc 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
| @@ -83,7 +83,9 @@ xfs_readlink_bmap( | |||
| 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_LOCK | XBF_MAPPED | XBF_DONT_BLOCK); | 85 | XBF_LOCK | XBF_MAPPED | XBF_DONT_BLOCK); |
| 86 | error = XFS_BUF_GETERROR(bp); | 86 | if (!bp) |
| 87 | return XFS_ERROR(ENOMEM); | ||
| 88 | error = bp->b_error; | ||
| 87 | if (error) { | 89 | if (error) { |
| 88 | xfs_ioerror_alert("xfs_readlink", | 90 | xfs_ioerror_alert("xfs_readlink", |
| 89 | ip->i_mount, bp, XFS_BUF_ADDR(bp)); | 91 | ip->i_mount, bp, XFS_BUF_ADDR(bp)); |
| @@ -94,7 +96,7 @@ xfs_readlink_bmap( | |||
| 94 | byte_cnt = pathlen; | 96 | byte_cnt = pathlen; |
| 95 | pathlen -= byte_cnt; | 97 | pathlen -= byte_cnt; |
| 96 | 98 | ||
| 97 | memcpy(link, XFS_BUF_PTR(bp), byte_cnt); | 99 | memcpy(link, bp->b_addr, byte_cnt); |
| 98 | xfs_buf_relse(bp); | 100 | xfs_buf_relse(bp); |
| 99 | } | 101 | } |
| 100 | 102 | ||
| @@ -1648,13 +1650,13 @@ xfs_symlink( | |||
| 1648 | byte_cnt = XFS_FSB_TO_B(mp, mval[n].br_blockcount); | 1650 | byte_cnt = XFS_FSB_TO_B(mp, mval[n].br_blockcount); |
| 1649 | bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, | 1651 | bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, |
| 1650 | BTOBB(byte_cnt), 0); | 1652 | BTOBB(byte_cnt), 0); |
| 1651 | ASSERT(bp && !XFS_BUF_GETERROR(bp)); | 1653 | ASSERT(!xfs_buf_geterror(bp)); |
| 1652 | if (pathlen < byte_cnt) { | 1654 | if (pathlen < byte_cnt) { |
| 1653 | byte_cnt = pathlen; | 1655 | byte_cnt = pathlen; |
| 1654 | } | 1656 | } |
| 1655 | pathlen -= byte_cnt; | 1657 | pathlen -= byte_cnt; |
| 1656 | 1658 | ||
| 1657 | memcpy(XFS_BUF_PTR(bp), cur_chunk, byte_cnt); | 1659 | memcpy(bp->b_addr, cur_chunk, byte_cnt); |
| 1658 | cur_chunk += byte_cnt; | 1660 | cur_chunk += byte_cnt; |
| 1659 | 1661 | ||
| 1660 | xfs_trans_log_buf(tp, bp, 0, byte_cnt - 1); | 1662 | xfs_trans_log_buf(tp, bp, 0, byte_cnt - 1); |
| @@ -1999,7 +2001,7 @@ xfs_zero_remaining_bytes( | |||
| 1999 | mp, bp, XFS_BUF_ADDR(bp)); | 2001 | mp, bp, XFS_BUF_ADDR(bp)); |
| 2000 | break; | 2002 | break; |
| 2001 | } | 2003 | } |
| 2002 | memset(XFS_BUF_PTR(bp) + | 2004 | memset(bp->b_addr + |
| 2003 | (offset - XFS_FSB_TO_B(mp, imap.br_startoff)), | 2005 | (offset - XFS_FSB_TO_B(mp, imap.br_startoff)), |
| 2004 | 0, lastoffset - offset + 1); | 2006 | 0, lastoffset - offset + 1); |
| 2005 | XFS_BUF_UNDONE(bp); | 2007 | XFS_BUF_UNDONE(bp); |
