From: OGAWA Hirofumi Date: Tue, 20 Feb 2007 21:57:55 +0000 (-0800) Subject: [PATCH] FAT: DIO-write fallback to normal buffered X-Git-Tag: v2.6.21-rc1~37 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=94412a96c4553255bda7a232a349059dd7543338;p=linux-2.6-omap-h63xx.git [PATCH] FAT: DIO-write fallback to normal buffered If the DIO write on FAT is expanding the size, it will be fail by -EINVAL, because FAT can't handle it now. This patch fallback it to the normal buffered-write and would return success. Signed-off-by: OGAWA Hirofumi Acked-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 76107354421..9bfe607c892 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -173,10 +173,12 @@ static ssize_t fat_direct_IO(int rw, struct kiocb *iocb, * * But we must fill the remaining area or hole by nul for * updating ->mmu_private. + * + * Return 0, and fallback to normal buffered write. */ loff_t size = offset + iov_length(iov, nr_segs); if (MSDOS_I(inode)->mmu_private < size) - return -EINVAL; + return 0; } /*