aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_super.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2011-03-26 09:14:44 +1100
committerDave Chinner <david@fromorbit.com>2011-03-26 09:14:44 +1100
commit7401aafd5019d32a888e5f27332cf580945574bf (patch)
tree6a09fb6c38e6e96e239873bdefd24a890da09c9d /fs/xfs/linux-2.6/xfs_super.c
parentxfs: introduce inode cluster buffer trylocks for xfs_iflush (diff)
downloadlinux-dev-7401aafd5019d32a888e5f27332cf580945574bf.tar.xz
linux-dev-7401aafd5019d32a888e5f27332cf580945574bf.zip
xfs: xfs_trans_read_buf() should return an error on failure
When inside a transaction and we fail to read a buffer, xfs_trans_read_buf returns a null buffer pointer and no error. xfs_do_da_buf() checks the error return, but not the buffer, and as a result this read failure condition causes a panic when it attempts to dereference the non-existant buffer. Make xfs_trans_read_buf() return the same error for this situation regardless of whether it is in a transaction or not. This means every caller does not need to check both the error return and the buffer before proceeding to use the buffer. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
0 files changed, 0 insertions, 0 deletions