Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[linux-2.6-microblaze.git] / fs / ext4 / dir.c
index 1f34074..9aa1f75 100644 (file)
@@ -129,12 +129,14 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)
                if (err != ERR_BAD_DX_DIR) {
                        return err;
                }
-               /*
-                * We don't set the inode dirty flag since it's not
-                * critical that it get flushed back to the disk.
-                */
-               ext4_clear_inode_flag(file_inode(file),
-                                     EXT4_INODE_INDEX);
+               /* Can we just clear INDEX flag to ignore htree information? */
+               if (!ext4_has_metadata_csum(sb)) {
+                       /*
+                        * We don't set the inode dirty flag since it's not
+                        * critical that it gets flushed back to the disk.
+                        */
+                       ext4_clear_inode_flag(inode, EXT4_INODE_INDEX);
+               }
        }
 
        if (ext4_has_inline_data(inode)) {