Skip to contentSkip to conversation

reiser4: fixup status writes

PATCH New Edward Shishkin 1 participant 1 message Aug 16, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 reiser4: fixup status writes

Reset bio in reiser4_status_write() to prevent oops in error paths.

---
 fs/reiser4/status_flags.c |    1 +
 1 file changed, 1 insertion(+)
fs/reiser4/status_flags.c +1 -0
@@ -145,6 +145,7 @@ int reiser4_status_write(__u64 status, _
 	strncpy(statuspage->texterror, message, REISER4_TEXTERROR_LEN);
 
 	kunmap_atomic((char *)statuspage);
+	bio_reset(bio);
 	bio->bi_bdev = sb->s_bdev;
 	bio->bi_io_vec[0].bv_page = get_super_private(sb)->status_page;
 	bio->bi_io_vec[0].bv_len = sb->s_blocksize;