fs: use mapping_set_error instead of opencoded set_bit
[cascardo/linux.git] / fs / open.c
index 8aeb08b..a7719cf 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -300,7 +300,8 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
         * Let individual file system decide if it supports preallocation
         * for directories or not.
         */
-       if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode))
+       if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode) &&
+           !S_ISBLK(inode->i_mode))
                return -ENODEV;
 
        /* Check for wrap through zero too */