Skip to content

Commit

Permalink
vfio/iova_bitmap: Explicitly include linux/slab.h
Browse files Browse the repository at this point in the history
kzalloc/kzfree are used so include `slab.h`. While it happens to work
without it, due to commit 8b9f3ac ("fs: introduce alloc_inode_sb() to
allocate filesystems specific inode") which indirectly includes via:

. ./include/linux/mm.h
.. ./include/linux/huge_mm.h
... ./include/linux/fs.h
.... ./include/linux/slab.h

Make it explicit should any of its indirect dependencies be dropped/changed
for entirely different reasons as it was the cause prior to commit above
recently (i.e. <= v5.18).

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Link: https://lore.kernel.org/r/20221025193114.58695-2-joao.m.martins@oracle.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
  • Loading branch information
Joao Martins authored and Alex Williamson committed Nov 9, 2022
1 parent e67e070 commit ea00d4e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/vfio/iova_bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
#include <linux/iova_bitmap.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/highmem.h>

#define BITS_PER_PAGE (PAGE_SIZE * BITS_PER_BYTE)
Expand Down

0 comments on commit ea00d4e

Please sign in to comment.