On Thu, Dec 20, 2001 at 10:27:37AM -0800, Linus Torvalds wrote:
>
> On Thu, 20 Dec 2001, Andrea Arcangeli wrote:
> > Anyways here the fix (untested as usual :)
> >
> > --- 2.4.17rc2aa1/fs/buffer.c.~1~ Wed Dec 19 03:43:24 2001
> > +++ 2.4.17rc2aa1/fs/buffer.c Thu Dec 20 19:02:02 2001
> > @@ -2337,7 +2337,7 @@
> > struct buffer_head *bh;
> >
> > page = find_or_create_page(bdev->bd_inode->i_mapping, index, GFP_NOFS);
> > - if (IS_ERR(page))
> > + if (!page)
>
> Isn't this in 2.4.17 already? Marcelo, please check.
it isn't in 2.4.17-rc2.
>
> > +++ 2.4.17rc2aa1/mm/filemap.c Thu Dec 20 19:01:53 2001
> > @@ -942,7 +942,7 @@
> > spin_unlock(&pagecache_lock);
> > if (!page) {
> > struct page *newpage = alloc_page(gfp_mask);
> > - page = ERR_PTR(-ENOMEM);
> > + page = NULL;
>
> Don't be silly, just remove the line (page _is_ NULL already, we just
> checked).
indeed (compiler could optimize it away but nicer code to delete it).
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Dec 23 2001 - 21:00:22 EST