Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107148
b: refs/heads/master
c: af6dc22
h: refs/heads/master
v: v3
  • Loading branch information
Ralf Baechle committed Jul 30, 2008
1 parent 64dc441 commit 0ceab44
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94ad374a0751f40d25e22e036c37f7263569d24c
refs/heads/master: af6dc22b03a95c31b690f299b2fd7acb279fe7f5
4 changes: 0 additions & 4 deletions trunk/arch/mips/mm/tlb-r3k.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,6 @@ void __init add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
old_pagemask = read_c0_pagemask();
w = read_c0_wired();
write_c0_wired(w + 1);
if (read_c0_wired() != w + 1) {
printk("[tlbwired] No WIRED reg?\n");
return;
}
write_c0_index(w << 8);
write_c0_pagemask(pagemask);
write_c0_entryhi(entryhi);
Expand Down
37 changes: 14 additions & 23 deletions trunk/fs/romfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,7 @@ static int
romfs_readpage(struct file *file, struct page * page)
{
struct inode *inode = page->mapping->host;
loff_t offset, size;
unsigned long filled;
loff_t offset, avail, readlen;
void *buf;
int result = -EIO;

Expand All @@ -431,29 +430,21 @@ romfs_readpage(struct file *file, struct page * page)

/* 32 bit warning -- but not for us :) */
offset = page_offset(page);
size = i_size_read(inode);
filled = 0;
result = 0;
if (offset < size) {
unsigned long readlen;

size -= offset;
readlen = size > PAGE_SIZE ? PAGE_SIZE : size;

filled = romfs_copyfrom(inode, buf, ROMFS_I(inode)->i_dataoffset+offset, readlen);

if (filled != readlen) {
SetPageError(page);
filled = 0;
result = -EIO;
if (offset < i_size_read(inode)) {
avail = inode->i_size-offset;
readlen = min_t(unsigned long, avail, PAGE_SIZE);
if (romfs_copyfrom(inode, buf, ROMFS_I(inode)->i_dataoffset+offset, readlen) == readlen) {
if (readlen < PAGE_SIZE) {
memset(buf + readlen,0,PAGE_SIZE-readlen);
}
SetPageUptodate(page);
result = 0;
}
}

if (filled < PAGE_SIZE)
memset(buf + filled, 0, PAGE_SIZE-filled);

if (!result)
SetPageUptodate(page);
if (result) {
memset(buf, 0, PAGE_SIZE);
SetPageError(page);
}
flush_dcache_page(page);

unlock_page(page);
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,7 @@ void iov_iter_advance(struct iov_iter *i, size_t bytes)
* The !iov->iov_len check ensures we skip over unlikely
* zero-length segments (without overruning the iovec).
*/
while (bytes || unlikely(i->count && !iov->iov_len)) {
while (bytes || unlikely(!iov->iov_len && i->count)) {
int copy;

copy = min(bytes, iov->iov_len - base);
Expand Down

0 comments on commit 0ceab44

Please sign in to comment.