lkml.org 
[lkml]   [2000]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectminor kiobuf bugs

hi,
here are a couple of patches. I'd sent them out towards the end of
last year, guess they got missed.

1. in end_io_buffer_kiobuf() in fs/buffer.c, kiobuf->errno is set after
kiobuf->end_io() is called. I think it ought to be done earlier, otherwise
an error in the last buffer_head is not reflected in kiobuf->errno when
kiobuf->end_io() runs. this doesn't cause any problems currently since
do_kio() looks at BH_Uptodate of each of the buffer_heads.

2. get_page_map(), which is used only by kiobuf code AFAIK. MAP_NR() should
be called with vaddr.

ganesh

patches are against 2.3.47

--- linux/fs/buffer.c.ORG Wed Feb 23 12:09:55 2000
+++ linux/fs/buffer.c Wed Feb 23 12:10:32 2000
@@ -1735,10 +1735,10 @@
mark_buffer_uptodate(bh, uptodate);

kiobuf = bh->b_kiobuf;
- if (atomic_dec_and_test(&kiobuf->io_count))
- kiobuf->end_io(kiobuf);
if (!uptodate)
kiobuf->errno = -EIO;
+ if (atomic_dec_and_test(&kiobuf->io_count))
+ kiobuf->end_io(kiobuf);
}


--- linux/mm/memory.c.ORG Wed Feb 23 12:10:48 2000
+++ linux/mm/memory.c Wed Feb 23 12:11:46 2000
@@ -418,7 +418,7 @@

struct page * get_page_map(struct page *page, unsigned long vaddr)
{
- if (MAP_NR(page) >= max_mapnr)
+ if (MAP_NR(vaddr) >= max_mapnr)
return 0;
if (page == ZERO_PAGE(vaddr))
return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.033 / U:21.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site