On Wed, 2011-03-23 at 17:14 +1100, Dave Chinner wrote: > From: Dave Chinner <dchinner@xxxxxxxxxx> > > 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. Good idea. Later we can clean up callers. I see that not all callers currently check for a null buffer return... Reviewed-by: Alex Elder <aelder@xxxxxxx> > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> > --- > fs/xfs/xfs_trans_buf.c | 3 ++- _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs