summaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-12-04 03:58:56 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-12-04 03:58:56 +0000
commit1d67e90f19a7acfd9a05dc59678e7d0c5090bd0d (patch)
tree357efc7b93f8f5102110d20d293f41360ec212fc /mm/filemap.c
parentaea27b2e18d69af87e673972246e66657b4fa274 (diff)
Merge with Linux 2.3.21.
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 5efa9aaf7..51624abcf 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -127,7 +127,7 @@ repeat:
goto repeat;
}
if (page_count(page) != 2)
- printk("hm, busy page invalidated? (not necesserily a bug)\n");
+ printk("hm, busy page invalidated? (not necessarily a bug)\n");
lru_cache_del(page);
remove_page_from_inode_queue(page);
@@ -912,6 +912,8 @@ static void generic_file_readahead(int reada_ok,
ahead = 0;
while (ahead < max_ahead) {
ahead += PAGE_CACHE_SIZE;
+ if ((raend + ahead) >= inode->i_size)
+ break;
page_cache_read(filp, raend + ahead);
}
/*
@@ -1779,6 +1781,7 @@ generic_file_write(struct file *file, const char *buf,
long status;
int err;
+ down(&inode->i_sem);
err = file->f_error;
if (err) {
file->f_error = 0;
@@ -1872,6 +1875,7 @@ repeat_find:
err = written ? written : status;
out:
+ up(&inode->i_sem);
return err;
}