Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab82705c authored by Sahitya Tummala's avatar Sahitya Tummala
Browse files

f2fs: don't use the submitted bio for a new page



The f2fs_merge_page_bio() incorrectly uses the bio after
it is submitted for IO when fscrypt_mergeable_bio()
returns false. Fix it by making the submitted bio NULL
so that a new bio gets allocated for the next/new page.

Change-Id: I511a425d1c44e89d9ac29e4ebe3ae66444da2eb9
Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
parent d026bbd5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -555,8 +555,10 @@ int f2fs_merge_page_bio(struct f2fs_io_info *fio)
	}
	/* ICE support */
	if (bio && !fscrypt_mergeable_bio(bio, dun,
				bio_encrypted, bi_crypt_skip))
				bio_encrypted, bi_crypt_skip)) {
		__submit_bio(fio->sbi, bio, fio->type);
		bio = NULL;
	}
alloc_new:
	if (!bio) {
		bio = __bio_alloc(fio->sbi, fio->new_blkaddr, fio->io_wbc,