get_page missing from generic_file_write? (2.3.12)

Neil Booth (NeilB@earthling.net)
Wed, 4 Aug 1999 07:49:36 +0900


I'm not sure, but it appears that after adding a page to the page
cache, we do not increase its reference count before reducing it again
later in the function. The following looks more correct, no?

Neil.

--- mm/filemap.c Thu Jul 22 21:45:58 1999
+++ mm/filemap.new.c Wed Aug 4 07:41:25 1999
@@ -1844,12 +1844,13 @@
status = -ENOMEM;
break;
}
page = page_cache_entry(page_cache);
if (add_to_page_cache_unique(page,inode,pgpos,hash))
goto repeat_find;
+ get_page(page);

page_cache = 0;
}

/* We have exclusive IO access to the page.. */
if (!PageLocked(page)) {

-- 

- 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/