From 77f8f6b18c5aa49b553812ee85dd2071636fc00c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 Oct 2013 11:22:51 -0700 Subject: [PATCH] 3.10-stable patches added patches: bcache-fix-a-dumb-journal-discard-bug.patch block-fix-bio_copy_data.patch sysv-add-forgotten-superblock-lock-init-for-v7-fs.patch --- ...cache-fix-a-dumb-journal-discard-bug.patch | 31 +++++++++++++++++ queue-3.10/block-fix-bio_copy_data.patch | 34 +++++++++++++++++++ queue-3.10/series | 3 ++ ...otten-superblock-lock-init-for-v7-fs.patch | 32 +++++++++++++++++ 4 files changed, 100 insertions(+) create mode 100644 queue-3.10/bcache-fix-a-dumb-journal-discard-bug.patch create mode 100644 queue-3.10/block-fix-bio_copy_data.patch create mode 100644 queue-3.10/series create mode 100644 queue-3.10/sysv-add-forgotten-superblock-lock-init-for-v7-fs.patch diff --git a/queue-3.10/bcache-fix-a-dumb-journal-discard-bug.patch b/queue-3.10/bcache-fix-a-dumb-journal-discard-bug.patch new file mode 100644 index 00000000000..235d7773b75 --- /dev/null +++ b/queue-3.10/bcache-fix-a-dumb-journal-discard-bug.patch @@ -0,0 +1,31 @@ +From 6d9d21e35fbfa2934339e96934f862d118abac23 Mon Sep 17 00:00:00 2001 +From: Kent Overstreet +Date: Mon, 23 Sep 2013 23:17:27 -0700 +Subject: bcache: Fix a dumb journal discard bug + +From: Kent Overstreet + +commit 6d9d21e35fbfa2934339e96934f862d118abac23 upstream. + +That switch statement was obviously wrong, leading to some sort of weird +spinning on rare occasion with discards enabled... + +Signed-off-by: Kent Overstreet +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/bcache/journal.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/md/bcache/journal.c ++++ b/drivers/md/bcache/journal.c +@@ -425,7 +425,7 @@ static void do_journal_discard(struct ca + return; + } + +- switch (atomic_read(&ja->discard_in_flight) == DISCARD_IN_FLIGHT) { ++ switch (atomic_read(&ja->discard_in_flight)) { + case DISCARD_IN_FLIGHT: + return; + diff --git a/queue-3.10/block-fix-bio_copy_data.patch b/queue-3.10/block-fix-bio_copy_data.patch new file mode 100644 index 00000000000..2d91e1410a8 --- /dev/null +++ b/queue-3.10/block-fix-bio_copy_data.patch @@ -0,0 +1,34 @@ +From 2f6cf0de0281d210061ce976f2d42d246adc75bb Mon Sep 17 00:00:00 2001 +From: Kent Overstreet +Date: Mon, 23 Sep 2013 23:17:26 -0700 +Subject: block: Fix bio_copy_data() + +From: Kent Overstreet + +commit 2f6cf0de0281d210061ce976f2d42d246adc75bb upstream. + +The memcpy() in bio_copy_data() was using the wrong offset vars, leading +to data corruption in weird unusual setups. + +Signed-off-by: Kent Overstreet +Cc: Jens Axboe +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/bio.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/fs/bio.c ++++ b/fs/bio.c +@@ -917,8 +917,8 @@ void bio_copy_data(struct bio *dst, stru + src_p = kmap_atomic(src_bv->bv_page); + dst_p = kmap_atomic(dst_bv->bv_page); + +- memcpy(dst_p + dst_bv->bv_offset, +- src_p + src_bv->bv_offset, ++ memcpy(dst_p + dst_offset, ++ src_p + src_offset, + bytes); + + kunmap_atomic(dst_p); diff --git a/queue-3.10/series b/queue-3.10/series new file mode 100644 index 00000000000..c23a966f27d --- /dev/null +++ b/queue-3.10/series @@ -0,0 +1,3 @@ +block-fix-bio_copy_data.patch +sysv-add-forgotten-superblock-lock-init-for-v7-fs.patch +bcache-fix-a-dumb-journal-discard-bug.patch diff --git a/queue-3.10/sysv-add-forgotten-superblock-lock-init-for-v7-fs.patch b/queue-3.10/sysv-add-forgotten-superblock-lock-init-for-v7-fs.patch new file mode 100644 index 00000000000..aef5989465f --- /dev/null +++ b/queue-3.10/sysv-add-forgotten-superblock-lock-init-for-v7-fs.patch @@ -0,0 +1,32 @@ +From 49475555848d396a0c78fb2f8ecceb3f3f263ef1 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 18 Sep 2013 12:39:16 +0200 +Subject: sysv: Add forgotten superblock lock init for v7 fs + +From: Lubomir Rintel + +commit 49475555848d396a0c78fb2f8ecceb3f3f263ef1 upstream. + +Superblock lock was replaced with (un)lock_super() removal, but left +uninitialized for Seventh Edition UNIX filesystem in the following commit (3.7): +c07cb01 sysv: drop lock/unlock super + +Signed-off-by: Lubomir Rintel +Signed-off-by: Christoph Hellwig +Signed-off-by: Al Viro +Signed-off-by: Greg Kroah-Hartman + +--- + fs/sysv/super.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/sysv/super.c ++++ b/fs/sysv/super.c +@@ -487,6 +487,7 @@ static int v7_fill_super(struct super_bl + sbi->s_sb = sb; + sbi->s_block_base = 0; + sbi->s_type = FSTYPE_V7; ++ mutex_init(&sbi->s_lock); + sb->s_fs_info = sbi; + + sb_set_blocksize(sb, 512); -- 2.47.2