From 967c65a99059fd459b956c1588ce0ba227912c4e Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 16 Dec 1997 05:34:03 +0000 Subject: Merge with Linux 2.1.72, part 1. --- fs/fat/file.c | 13 ++++++++++++- fs/fat/mmap.c | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'fs/fat') diff --git a/fs/fat/file.c b/fs/fat/file.c index f3a4f6cec..c1357f784 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c @@ -155,7 +155,7 @@ static void fat_prefetch ( /* Read a file into user space */ -ssize_t fat_file_read( +static ssize_t fat_file_read_text( struct file *filp, char *buf, size_t count, @@ -270,6 +270,17 @@ ssize_t fat_file_read( return buf-start; } +ssize_t fat_file_read( + struct file *filp, + char *buf, + size_t count, + loff_t *ppos) +{ + struct inode *inode = filp->f_dentry->d_inode; + if (!MSDOS_I(inode)->i_binary) + return fat_file_read_text(filp, buf, count, ppos); + return generic_file_read(filp, buf, count, ppos); +} /* Write to a file either from user space */ diff --git a/fs/fat/mmap.c b/fs/fat/mmap.c index 545874a04..48cbc7b4f 100644 --- a/fs/fat/mmap.c +++ b/fs/fat/mmap.c @@ -60,7 +60,7 @@ static unsigned long fat_file_mmap_nopage( filp.f_pos = pos; need_read = PAGE_SIZE - clear; { - unsigned long cur_fs = get_fs(); + mm_segment_t cur_fs = get_fs(); set_fs (KERNEL_DS); cur_read = fat_file_read (&filp, (char*)page, need_read, &filp.f_pos); -- cgit v1.2.3