Re: [PATCH] include buffer_head.h in actual users instead of fs.h (6/10)

Andrew Morton (akpm@zip.com.au)
Thu, 23 May 2002 12:29:51 -0700


Christoph Hellwig wrote:
>
> Make the 7 file that need it in mm/ include buffer_head.h directly.
> Once again most files shouln't need it and want fixing.

Yup. In fact, some declarations need to be moved out of
buffer_head.h.

> --- 1.91/mm/filemap.c Sun May 19 13:49:50 2002
> +++ edited/mm/filemap.c Thu May 23 13:19:05 2002
> @@ -20,6 +20,16 @@
> #include <linux/iobuf.h>
> #include <linux/hash.h>
> #include <linux/writeback.h>
> +/*
> + * This is needed for the following functions:
> + * - try_to_release_page

This isn't buffer-specific; should be in mm.h or similar.

> + * - block_flushpage

Should never be called - all callers should call
call a_ops->flushpage() (and rename it to
invalidatepage, for heavens sake)

> + * - page_has_buffers

well hopefully we can do something a little tidier than
all the invalidate_foo2() functions. But that's in fact
a happens-to-not-matter bug. Should be using PagePrivate()
in invalidate_this_page2()

> + * - generic_osync_inode

Sigh. Needs to be pushed out to generic_file_write()
callers, I suspect.

etc...

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