summaryrefslogtreecommitdiffstats
path: root/fs/fat
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-12-16 05:34:03 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-12-16 05:34:03 +0000
commit967c65a99059fd459b956c1588ce0ba227912c4e (patch)
tree8224d013ff5d255420713d05610c7efebd204d2a /fs/fat
parente20c1cc1656a66a2773bca4591a895cbc12696ff (diff)
Merge with Linux 2.1.72, part 1.
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/file.c13
-rw-r--r--fs/fat/mmap.c2
2 files changed, 13 insertions, 2 deletions
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);