diff options
author | Dave Chinner <david@fromorbit.com> | 2008-11-10 16:50:24 +1100 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-11-10 16:50:24 +1100 |
commit | 644c3567d16b7e53cf52ae98c4150d601c9eacfe (patch) | |
tree | e3081a3e1147c07d456b7e1e8b34fd3f3b11275d /samples | |
parent | dcd7b4e5c0649b1d2219399529b20de1df517e55 (diff) |
[XFS] handle memory allocation failures during log initialisation
When there is no memory left in the system, xfs_buf_get_noaddr()
can fail. If this happens at mount time during xlog_alloc_log()
we fail to catch the error and oops.
Catch the error from xfs_buf_get_noaddr(), and allow other memory
allocations to fail and catch those errors too. Report the error
to the console and fail the mount with ENOMEM.
Tested by manually injecting errors into xfs_buf_get_noaddr() and
xlog_alloc_log().
Version 2:
o remove unnecessary casts of the returned pointer from kmem_zalloc()
SGI-PV: 987246
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions