ocfs2: clear the rest of the buffers on error
PATCH 6/28 ocfs2: clear the rest of the buffers on error
From: Goldwyn Rodrigues <[email protected]>
Subject: ocfs2: clear the rest of the buffers on error
In case a validation fails, clear the rest of the buffers and return the error to the calling function.
This also facilitates bubbling up the error originating from ocfs2_error to calling functions.
Signed-off-by Goldwyn Rodrigues <[email protected]>
Cc Mark Fasheh <[email protected]>
Cc Joel Becker <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
fs/ocfs2/buffer_head_io.c | 6 ++++++ 1 file changed, 6 insertions(+)
fs/ocfs2/buffer_head_io.c renamed from fs/ocfs2/buffer_head_io.c~clear-the-rest-of-the-buffers-on-error +6 -0
@@ -316,6 +316,12 @@ int ocfs2_read_blocks(struct ocfs2_cachi bh = bhs[i];if (!(flags &OCFS2_BH_READAHEAD )) { +if (status) { +/* Clear the rest of the buffers on error */ +put_bh (bh); + bhs[i] =NULL ; +continue ; + }/* We know this can't have changed as we hold the * owner sem. Avoid doing any work on the bh if the * journal has it. */
_
PATCH 6/28 ocfs2: clear the rest of the buffers on error
Quoted 6 lines · Andrew Morton
From: Goldwyn Rodrigues <[email protected]>
Subject: ocfs2: clear the rest of the buffers on errorIn case a validation fails, clear the rest of the buffers and return the error to the calling function.
Quoted 7 lines
This also facilitates bubbling up the error originating from
ocfs2_errorto calling functions.Signed-off-by Goldwyn Rodrigues <[email protected]>Cc Mark Fasheh <[email protected]>Cc Joel Becker <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Reviewed-by Mark Fasheh <[email protected]>
--
Mark Fasheh