make the feature checks in ->fallocate future proof
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / ext4 / extents.c
index c4068f6abf03ce11ea653835ea22845aa3c0b2bf..4bdd160854ebb1a77a82145fb5e3063af40ded5e 100644 (file)
@@ -3645,7 +3645,7 @@ long ext4_fallocate(struct inode *inode, int mode, loff_t offset, loff_t len)
        unsigned int credits, blkbits = inode->i_blkbits;
 
        /* We only support the FALLOC_FL_KEEP_SIZE mode */
-       if (mode && (mode != FALLOC_FL_KEEP_SIZE))
+       if (mode & ~FALLOC_FL_KEEP_SIZE)
                return -EOPNOTSUPP;
 
        /*