--- /dev/null
+From 19ea80603715d473600cd993b9987bc97d042e02 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Sun, 16 Feb 2014 19:29:32 -0500
+Subject: ext4: don't leave i_crtime.tv_sec uninitialized
+
+From: Theodore Ts'o <tytso@mit.edu>
+
+commit 19ea80603715d473600cd993b9987bc97d042e02 upstream.
+
+If the i_crtime field is not present in the inode, don't leave the
+field uninitialized.
+
+Fixes: ef7f38359 ("ext4: Add nanosecond timestamps")
+Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
+Tested-by: Vegard Nossum <vegard.nossum@oracle.com>
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ext4/ext4.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/fs/ext4/ext4.h
++++ b/fs/ext4/ext4.h
+@@ -751,6 +751,8 @@ do { \
+ if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime)) \
+ (einode)->xtime.tv_sec = \
+ (signed)le32_to_cpu((raw_inode)->xtime); \
++ else \
++ (einode)->xtime.tv_sec = 0; \
+ if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \
+ ext4_decode_extra_time(&(einode)->xtime, \
+ raw_inode->xtime ## _extra); \
--- /dev/null
+From 23301410972330c0ae9a8afc379ba2005e249cc6 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Wed, 12 Feb 2014 12:16:04 -0500
+Subject: ext4: don't try to modify s_flags if the the file system is read-only
+
+From: Theodore Ts'o <tytso@mit.edu>
+
+commit 23301410972330c0ae9a8afc379ba2005e249cc6 upstream.
+
+If an ext4 file system is created by some tool other than mke2fs
+(perhaps by someone who has a pathalogical fear of the GPL) that
+doesn't set one or the other of the EXT2_FLAGS_{UN}SIGNED_HASH flags,
+and that file system is then mounted read-only, don't try to modify
+the s_flags field. Otherwise, if dm_verity is in use, the superblock
+will change, causing an dm_verity failure.
+
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ext4/super.c | 20 +++++++++++++-------
+ 1 file changed, 13 insertions(+), 7 deletions(-)
+
+--- a/fs/ext4/super.c
++++ b/fs/ext4/super.c
+@@ -3370,16 +3370,22 @@ static int ext4_fill_super(struct super_
+ for (i = 0; i < 4; i++)
+ sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]);
+ sbi->s_def_hash_version = es->s_def_hash_version;
+- i = le32_to_cpu(es->s_flags);
+- if (i & EXT2_FLAGS_UNSIGNED_HASH)
+- sbi->s_hash_unsigned = 3;
+- else if ((i & EXT2_FLAGS_SIGNED_HASH) == 0) {
++ if (EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_DIR_INDEX)) {
++ i = le32_to_cpu(es->s_flags);
++ if (i & EXT2_FLAGS_UNSIGNED_HASH)
++ sbi->s_hash_unsigned = 3;
++ else if ((i & EXT2_FLAGS_SIGNED_HASH) == 0) {
+ #ifdef __CHAR_UNSIGNED__
+- es->s_flags |= cpu_to_le32(EXT2_FLAGS_UNSIGNED_HASH);
+- sbi->s_hash_unsigned = 3;
++ if (!(sb->s_flags & MS_RDONLY))
++ es->s_flags |=
++ cpu_to_le32(EXT2_FLAGS_UNSIGNED_HASH);
++ sbi->s_hash_unsigned = 3;
+ #else
+- es->s_flags |= cpu_to_le32(EXT2_FLAGS_SIGNED_HASH);
++ if (!(sb->s_flags & MS_RDONLY))
++ es->s_flags |=
++ cpu_to_le32(EXT2_FLAGS_SIGNED_HASH);
+ #endif
++ }
+ }
+
+ /* Handle clustersize */
--- /dev/null
+From 3d2660d0c9c2f296837078c189b68a47f6b2e3b5 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Sat, 15 Feb 2014 22:42:25 -0500
+Subject: ext4: fix online resize with a non-standard blocks per group setting
+
+From: Theodore Ts'o <tytso@mit.edu>
+
+commit 3d2660d0c9c2f296837078c189b68a47f6b2e3b5 upstream.
+
+The set_flexbg_block_bitmap() function assumed that the number of
+blocks in a blockgroup was sb->blocksize * 8, which is normally true,
+but not always! Use EXT4_BLOCKS_PER_GROUP(sb) instead, to fix block
+bitmap corruption after:
+
+mke2fs -t ext4 -g 3072 -i 4096 /dev/vdd 1G
+mount -t ext4 /dev/vdd /vdd
+resize2fs /dev/vdd 8G
+
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+Reported-by: Jon Bernard <jbernard@tuxion.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ext4/resize.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/ext4/resize.c
++++ b/fs/ext4/resize.c
+@@ -377,7 +377,7 @@ static int set_flexbg_block_bitmap(struc
+ start = ext4_group_first_block_no(sb, group);
+ group -= flex_gd->groups[0].group;
+
+- count2 = sb->s_blocksize * 8 - (block - start);
++ count2 = EXT4_BLOCKS_PER_GROUP(sb) - (block - start);
+ if (count2 > count)
+ count2 = count;
+
--- /dev/null
+ext4-don-t-try-to-modify-s_flags-if-the-the-file-system-is-read-only.patch
+ext4-fix-online-resize-with-a-non-standard-blocks-per-group-setting.patch
+ext4-don-t-leave-i_crtime.tv_sec-uninitialized.patch