aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2007-02-20 16:57:55 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-20 20:10:14 -0500
commit94412a96c4553255bda7a232a349059dd7543338 (patch)
treebfffad25e95f33503b4d212b6670885262084b11 /fs/fat
parent346fd59bab28093276be102632f72691a2c243fe (diff)
[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 <hirofumi@mail.parknet.co.jp> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 761073544217..9bfe607c892e 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,
173 * 173 *
174 * But we must fill the remaining area or hole by nul for 174 * But we must fill the remaining area or hole by nul for
175 * updating ->mmu_private. 175 * updating ->mmu_private.
176 *
177 * Return 0, and fallback to normal buffered write.
176 */ 178 */
177 loff_t size = offset + iov_length(iov, nr_segs); 179 loff_t size = offset + iov_length(iov, nr_segs);
178 if (MSDOS_I(inode)->mmu_private < size) 180 if (MSDOS_I(inode)->mmu_private < size)
179 return -EINVAL; 181 return 0;
180 } 182 }
181 183
182 /* 184 /*