diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-10-10 12:52:49 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-10-11 22:15:10 -0400 |
commit | 901796afca0d31d97bf6d1bf2ab251a93a4b8c83 (patch) | |
tree | 85f204657d81700492487acbf39fb9702e6b0842 /fs/xfs/xfs_vnodeops.c | |
parent | 4347b9d7ad4223474d315c3ab6bc1ce7cce7fa2d (diff) |
xfs: clean up xfs_ioerror_alert
Instead of passing the block number and mount structure explicitly
get them off the bp and fix make the argument order more natural.
Also move it to xfs_buf.c and stop printing the device name given
that we already get the fs name as part of xfs_alert, and we know
what device is operates on because of the caller that gets printed,
finally rename it to xfs_buf_ioerror_alert and pass __func__ as
argument where it makes sense.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index fc38f15808c..4ecf2a54906 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -87,8 +87,7 @@ xfs_readlink_bmap( | |||
87 | return XFS_ERROR(ENOMEM); | 87 | return XFS_ERROR(ENOMEM); |
88 | error = bp->b_error; | 88 | error = bp->b_error; |
89 | if (error) { | 89 | if (error) { |
90 | xfs_ioerror_alert("xfs_readlink", | 90 | xfs_buf_ioerror_alert(bp, __func__); |
91 | ip->i_mount, bp, XFS_BUF_ADDR(bp)); | ||
92 | xfs_buf_relse(bp); | 91 | xfs_buf_relse(bp); |
93 | goto out; | 92 | goto out; |
94 | } | 93 | } |
@@ -1993,8 +1992,8 @@ xfs_zero_remaining_bytes( | |||
1993 | xfsbdstrat(mp, bp); | 1992 | xfsbdstrat(mp, bp); |
1994 | error = xfs_buf_iowait(bp); | 1993 | error = xfs_buf_iowait(bp); |
1995 | if (error) { | 1994 | if (error) { |
1996 | xfs_ioerror_alert("xfs_zero_remaining_bytes(read)", | 1995 | xfs_buf_ioerror_alert(bp, |
1997 | mp, bp, XFS_BUF_ADDR(bp)); | 1996 | "xfs_zero_remaining_bytes(read)"); |
1998 | break; | 1997 | break; |
1999 | } | 1998 | } |
2000 | memset(bp->b_addr + | 1999 | memset(bp->b_addr + |
@@ -2006,8 +2005,8 @@ xfs_zero_remaining_bytes( | |||
2006 | xfsbdstrat(mp, bp); | 2005 | xfsbdstrat(mp, bp); |
2007 | error = xfs_buf_iowait(bp); | 2006 | error = xfs_buf_iowait(bp); |
2008 | if (error) { | 2007 | if (error) { |
2009 | xfs_ioerror_alert("xfs_zero_remaining_bytes(write)", | 2008 | xfs_buf_ioerror_alert(bp, |
2010 | mp, bp, XFS_BUF_ADDR(bp)); | 2009 | "xfs_zero_remaining_bytes(write)"); |
2011 | break; | 2010 | break; |
2012 | } | 2011 | } |
2013 | } | 2012 | } |