-tip: block, mm: Fix build error in mm/memcontrol.c
Subsystems (2)
Today's upstream tree build (x86, 64-bit, allyesconfig) failed with this build error:
mm/memcontrol.c: In function ‘mem_cgroup_force_empty’:
mm/memcontrol.c:1976: error: ‘BLK_RW_ASYNC’ undeclared (first use in this function) mm/memcontrol.c:1976: error: (Each undeclared identifier is reported only once mm/memcontrol.c:1976: error: for each function it appears in.)
Due to commit:
8aa7e84: Fix congestion_wait() sync/async vs read/write confusion
Missing to include a required header file for the BLK_RW_ASYNC.
--- mm/memcontrol.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
mm/memcontrol.c +1 -0
@@ -25,6 +25,7 @@#include <linux/smp.h> #include <linux/page-flags.h> #include <linux/backing-dev.h> +#include <linux/blkdev.h> #include <linux/bit_spinlock.h> #include <linux/rcupdate.h> #include <linux/limits.h>
Quoted 3 lines · Ingo Molnar
Today's upstream tree build (x86, 64-bit, allyesconfig) failed with this build error:
I merged a better fix from Trond, which should make all of this unnecessary (just move BLK_RW_[A]SYNC to the header file that people need anyway).
Linus
Quoted 8 lines · Linus Torvalds
Quoted 3 lines · Ingo Molnar
Today's upstream tree build (x86, 64-bit, allyesconfig) failed with this build error:
I merged a better fix from Trond, which should make all of this unnecessary (just move BLK_RW_[A]SYNC to the header file that people need anyway).
ok, that's better. I think if in addition to that we also did what i suggested:
Quoted 5 lines
Fix it the simplest way for now, by moving the definitions early in
blkdev.h(this cannot break anything), but the real fix would be to split upblkdev.hintoblkdev-types.handblkdev-api.hand make only the API definitions/declarations dependent onCONFIG_BLOCK.
would be one step cleaner.
We could then include blkdev-types.h in backing-dev.h so that it picks up the constants. Right now having BLK_RW_[A]SYNC in backing-dev.h looks a bit weird. No strong opinion though.
Ingo