Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
[firefly-linux-kernel-4.4.55.git] / fs / ext3 / ioctl.c
index b7394d05ee8e9e8261d2a6e8be983b83781d2211..5e86ce9a86e05b20d3ffe297dd4b9191fee08994 100644 (file)
@@ -53,8 +53,7 @@ int ext3_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
                        goto flags_out;
                }
 
-               if (!S_ISDIR(inode->i_mode))
-                       flags &= ~EXT3_DIRSYNC_FL;
+               flags = ext3_mask_flags(inode->i_mode, flags);
 
                mutex_lock(&inode->i_mutex);
                /* Is it quota file? Do not allow user to mess with it */