From: Greg Kroah-Hartman Date: Tue, 3 Dec 2019 22:28:11 +0000 (+0100) Subject: drop f2fs patch from 4.14 and 4.19 as it added warnings X-Git-Tag: v5.4.2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2287cc4c1e1821937cb43b67f305776b07263938;p=thirdparty%2Fkernel%2Fstable-queue.git drop f2fs patch from 4.14 and 4.19 as it added warnings --- diff --git a/queue-4.14/f2fs-fix-to-data-block-override-node-segment-by-mist.patch b/queue-4.14/f2fs-fix-to-data-block-override-node-segment-by-mist.patch deleted file mode 100644 index eb9f9285d5e..00000000000 --- a/queue-4.14/f2fs-fix-to-data-block-override-node-segment-by-mist.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 533b6950b413fd564fb6a3e1f64f53e959c9b999 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 4 Mar 2019 09:32:25 +0800 -Subject: f2fs: fix to data block override node segment by mistake - -From: zhengliang - -[ Upstream commit a0770e13c8da83bdb64738c0209ab02dd3cfff8b ] - -v4: Rearrange the previous three versions. - -The following scenario could lead to data block override by mistake. - -TASK A | TASK kworker | TASK B | TASK C - | | | -open | | | -write | | | -close | | | - | f2fs_write_data_pages | | - | f2fs_write_cache_pages | | - | f2fs_outplace_write_data | | - | f2fs_allocate_data_block (get block in seg S, | | - | S is full, and only | | - | have this valid data | | - | block) | | - | allocate_segment | | - | locate_dirty_segment (mark S as PRE) | | - | f2fs_submit_page_write (submit but is not | | - | written on dev) | | -unlink | | | - iput_final | | | - f2fs_drop_inode | | | - f2fs_truncate | | | - (not evict) | | | - | | write_checkpoint | - | | flush merged bio but not wait file data writeback | - | | set_prefree_as_free (mark S as FREE) | - | | | update NODE/DATA - | | | allocate_segment (select S) - | writeback done | | - -So we need to guarantee io complete before truncate inode in f2fs_drop_inode. - -Reviewed-by: Chao Yu -Signed-off-by: Zheng Liang -Signed-off-by: Jaegeuk Kim -Signed-off-by: Sasha Levin ---- - fs/f2fs/super.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c -index e4aabfc21bd43..9554338f9c35d 100644 ---- a/fs/f2fs/super.c -+++ b/fs/f2fs/super.c -@@ -668,6 +668,10 @@ static int f2fs_drop_inode(struct inode *inode) - sb_start_intwrite(inode->i_sb); - f2fs_i_size_write(inode, 0); - -+ f2fs_submit_merged_write_cond(F2FS_I_SB(inode), -+ inode, NULL, 0, DATA); -+ truncate_inode_pages_final(inode->i_mapping); -+ - if (F2FS_HAS_BLOCKS(inode)) - f2fs_truncate(inode); - --- -2.20.1 - diff --git a/queue-4.14/series b/queue-4.14/series index 44dc5b9f858..62c907f589b 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -150,7 +150,6 @@ scsi-libsas-support-sata-phy-connection-rate-unmatch.patch acpi-apei-don-t-wait-to-serialise-with-oops-messages.patch acpi-apei-switch-estatus-pool-to-use-vmalloc-memory.patch scsi-libsas-check-smp-phy-control-function-result.patch -f2fs-fix-to-data-block-override-node-segment-by-mist.patch powerpc-pseries-dlpar-fix-a-missing-check-in-dlpar_p.patch mtd-remove-a-debug-trace-in-mtdpart.c.patch mm-gup-add-missing-refcount-overflow-checks-on-s390.patch diff --git a/queue-4.19/f2fs-fix-to-data-block-override-node-segment-by-mist.patch b/queue-4.19/f2fs-fix-to-data-block-override-node-segment-by-mist.patch deleted file mode 100644 index f71d5dfc071..00000000000 --- a/queue-4.19/f2fs-fix-to-data-block-override-node-segment-by-mist.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 9db064cac1f087e2f67fcd2b60b33a8047fe4294 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 4 Mar 2019 09:32:25 +0800 -Subject: f2fs: fix to data block override node segment by mistake - -From: zhengliang - -[ Upstream commit a0770e13c8da83bdb64738c0209ab02dd3cfff8b ] - -v4: Rearrange the previous three versions. - -The following scenario could lead to data block override by mistake. - -TASK A | TASK kworker | TASK B | TASK C - | | | -open | | | -write | | | -close | | | - | f2fs_write_data_pages | | - | f2fs_write_cache_pages | | - | f2fs_outplace_write_data | | - | f2fs_allocate_data_block (get block in seg S, | | - | S is full, and only | | - | have this valid data | | - | block) | | - | allocate_segment | | - | locate_dirty_segment (mark S as PRE) | | - | f2fs_submit_page_write (submit but is not | | - | written on dev) | | -unlink | | | - iput_final | | | - f2fs_drop_inode | | | - f2fs_truncate | | | - (not evict) | | | - | | write_checkpoint | - | | flush merged bio but not wait file data writeback | - | | set_prefree_as_free (mark S as FREE) | - | | | update NODE/DATA - | | | allocate_segment (select S) - | writeback done | | - -So we need to guarantee io complete before truncate inode in f2fs_drop_inode. - -Reviewed-by: Chao Yu -Signed-off-by: Zheng Liang -Signed-off-by: Jaegeuk Kim -Signed-off-by: Sasha Levin ---- - fs/f2fs/super.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c -index 7a9cc64f5ca37..b82b7163e0d08 100644 ---- a/fs/f2fs/super.c -+++ b/fs/f2fs/super.c -@@ -890,6 +890,10 @@ static int f2fs_drop_inode(struct inode *inode) - sb_start_intwrite(inode->i_sb); - f2fs_i_size_write(inode, 0); - -+ f2fs_submit_merged_write_cond(F2FS_I_SB(inode), -+ inode, NULL, 0, DATA); -+ truncate_inode_pages_final(inode->i_mapping); -+ - if (F2FS_HAS_BLOCKS(inode)) - f2fs_truncate(inode); - --- -2.20.1 - diff --git a/queue-4.19/series b/queue-4.19/series index 324dbaf740f..b60efae86f6 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -257,7 +257,6 @@ rdma-hns-bugfix-for-the-scene-without-receiver-queue.patch rdma-hns-fix-the-state-of-rereg-mr.patch rdma-hns-use-gfp_atomic-in-hns_roce_v2_modify_qp.patch asoc-rt5645-headphone-jack-sense-inverts-on-the-latt.patch -f2fs-fix-to-data-block-override-node-segment-by-mist.patch powerpc-pseries-dlpar-fix-a-missing-check-in-dlpar_p.patch xdp-fix-cpumap-redirect-skb-creation-bug.patch mtd-remove-a-debug-trace-in-mtdpart.c.patch