Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[linux-2.6-microblaze.git] / fs / ext4 / ioctl.c
index e9b0a1f..31627f7 100644 (file)
@@ -316,6 +316,12 @@ static void ext4_dax_dontcache(struct inode *inode, unsigned int flags)
 static bool dax_compatible(struct inode *inode, unsigned int oldflags,
                           unsigned int flags)
 {
+       /* Allow the DAX flag to be changed on inline directories */
+       if (S_ISDIR(inode->i_mode)) {
+               flags &= ~EXT4_INLINE_DATA_FL;
+               oldflags &= ~EXT4_INLINE_DATA_FL;
+       }
+
        if (flags & EXT4_DAX_FL) {
                if ((oldflags & EXT4_DAX_MUT_EXCL) ||
                     ext4_test_inode_state(inode,