Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339420
b: refs/heads/master
c: eab4e63
h: refs/heads/master
v: v3
  • Loading branch information
Dave Chinner authored and Ben Myers committed Nov 16, 2012
1 parent 31c6b34 commit da98061
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3f8fc73ac97b76a12692088ef9cace9af8422c0
refs/heads/master: eab4e63368b4cfa597dbdac66d1a7a836a693b7d
9 changes: 2 additions & 7 deletions trunk/fs/xfs/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,7 @@ xfs_buf_read_uncached(
int flags,
xfs_buf_iodone_t verify)
{
xfs_buf_t *bp;
int error;
struct xfs_buf *bp;

bp = xfs_buf_get_uncached(target, numblks, flags);
if (!bp)
Expand All @@ -730,11 +729,7 @@ xfs_buf_read_uncached(
bp->b_iodone = verify;

xfsbdstrat(target->bt_mount, bp);
error = xfs_buf_iowait(bp);
if (error) {
xfs_buf_relse(bp);
return NULL;
}
xfs_buf_iowait(bp);
return bp;
}

Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/xfs/xfs_fsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ xfs_growfs_data_private(
XFS_FSS_TO_BB(mp, 1), 0, NULL);
if (!bp)
return EIO;
if (bp->b_error) {
int error = bp->b_error;
xfs_buf_relse(bp);
return error;
}
xfs_buf_relse(bp);

new = nb; /* use new as a temporary here */
Expand Down
6 changes: 6 additions & 0 deletions trunk/fs/xfs/xfs_mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,12 @@ xfs_readsb(xfs_mount_t *mp, int flags)
xfs_warn(mp, "SB buffer read failed");
return EIO;
}
if (bp->b_error) {
error = bp->b_error;
if (loud)
xfs_warn(mp, "SB validate failed");
goto release_buf;
}

/*
* Initialize the mount structure from the superblock.
Expand Down
9 changes: 8 additions & 1 deletion trunk/fs/xfs/xfs_rtalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1876,6 +1876,11 @@ xfs_growfs_rt(
XFS_FSB_TO_BB(mp, 1), 0, NULL);
if (!bp)
return EIO;
if (bp->b_error) {
error = bp->b_error;
xfs_buf_relse(bp);
return error;
}
xfs_buf_relse(bp);

/*
Expand Down Expand Up @@ -2221,8 +2226,10 @@ xfs_rtmount_init(
bp = xfs_buf_read_uncached(mp->m_rtdev_targp,
d - XFS_FSB_TO_BB(mp, 1),
XFS_FSB_TO_BB(mp, 1), 0, NULL);
if (!bp) {
if (!bp || bp->b_error) {
xfs_warn(mp, "realtime device size check failed");
if (bp)
xfs_buf_relse(bp);
return EIO;
}
xfs_buf_relse(bp);
Expand Down

0 comments on commit da98061

Please sign in to comment.