diff options
Diffstat (limited to 'fs/fat/inode.c')
-rw-r--r-- | fs/fat/inode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 980e44bb9de6..6b3e203ff126 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -229,6 +229,13 @@ static ssize_t fat_direct_IO(int rw, struct kiocb *iocb, loff_t size = offset + iov_length(iov, nr_segs); if (MSDOS_I(inode)->mmu_private < size) return 0; + + /* + * In case of writing in fallocated region, return 0 and + * fallback to buffered write. + */ + if (MSDOS_I(inode)->i_disksize > MSDOS_I(inode)->mmu_private) + return 0; } /* |