mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
dax, xfs, ext4: compile out iomap-dax paths in the FS_DAX=n case
Tetsuo reports:
fs/built-in.o: In function `xfs_file_iomap_end':
xfs_iomap.c:(.text+0xe0ef9): undefined reference to `put_dax'
fs/built-in.o: In function `xfs_file_iomap_begin':
xfs_iomap.c:(.text+0xe1a7f): undefined reference to `dax_get_by_host'
make: *** [vmlinux] Error 1
$ grep DAX .config
CONFIG_DAX=m
# CONFIG_DEV_DAX is not set
# CONFIG_FS_DAX is not set
When FS_DAX=n we can/must throw away the dax code in filesystems.
Implement 'fs_' versions of dax_get_by_host() and put_dax() that are
nops in the FS_DAX=n case.
Cc: <[email protected]>
Cc: <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: "Theodore Ts'o" <[email protected]>
Cc: "Darrick J. Wong" <[email protected]>
Cc: Ross Zwisler <[email protected]>
Tested-by: Tony Luck <[email protected]>
Fixes: ef51042472 ("block, dax: move 'select DAX' from BLOCK to FS_DAX")
Reported-by: Tetsuo Handa <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
9d109081c2
commit
f5705aa8cf
4 changed files with 33 additions and 13 deletions
|
|
@ -1068,7 +1068,7 @@ xfs_file_iomap_begin(
|
|||
/* optionally associate a dax device with the iomap bdev */
|
||||
bdev = iomap->bdev;
|
||||
if (blk_queue_dax(bdev->bd_queue))
|
||||
iomap->dax_dev = dax_get_by_host(bdev->bd_disk->disk_name);
|
||||
iomap->dax_dev = fs_dax_get_by_host(bdev->bd_disk->disk_name);
|
||||
else
|
||||
iomap->dax_dev = NULL;
|
||||
|
||||
|
|
@ -1149,7 +1149,7 @@ xfs_file_iomap_end(
|
|||
unsigned flags,
|
||||
struct iomap *iomap)
|
||||
{
|
||||
put_dax(iomap->dax_dev);
|
||||
fs_put_dax(iomap->dax_dev);
|
||||
if ((flags & IOMAP_WRITE) && iomap->type == IOMAP_DELALLOC)
|
||||
return xfs_file_iomap_end_delalloc(XFS_I(inode), offset,
|
||||
length, written, iomap);
|
||||
|
|
|
|||
Loading…
Reference in a new issue