Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=94412a96c4553255bda7a232a349059dd7543338
Commit:     94412a96c4553255bda7a232a349059dd7543338
Parent:     346fd59bab28093276be102632f72691a2c243fe
Author:     OGAWA Hirofumi <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 20 13:57:55 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 20 17:10:14 2007 -0800

    [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 <[EMAIL PROTECTED]>
    Acked-by: Jan Kara <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/fat/inode.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 7610735..9bfe607 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;
        }
 
        /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to