Re: [PATCH -next] fs: fix fs/fs-writeback.c build error

From: Linus Torvalds
Date: Fri Jan 06 2012 - 18:01:53 EST


On Thu, Jan 5, 2012 at 4:18 PM, Randy Dunlap <rdunlap@xxxxxxxxxxxx> wrote:
>
> In linux-next, fs/fs-writeback.c no longer #includes <linux/buffer_head.h>,
> which #included <linux/pagemap.h>, so add that latter header file to
> <linux/writeback.h> to fix the build error:
>
> fs/fs-writeback.c:510:11: error: 'PAGE_CACHE_SHIFT' undeclared (first use in this function)

I would actually suggest:

- move the whole MIN_WRITEBACK_PAGES #define from the header file to
fs/writeback.c (why expose such a random #define to outside users that
have nothing to do with it?)

- make sure that fs/fs-writeback.c has that pagemap.h #include.

There's no reason why <linux/writeback.h> should include filemap.h per
se, and there is no reason why it should expose some internal chunking
#define to anybody else.

Wu?

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/