linux/fs/ext2
Vivek Goyal 3f666c56c6 dax: Pass dax_dev instead of bdev to dax_writeback_mapping_range()
As of now dax_writeback_mapping_range() takes "struct block_device" as a
parameter and dax_dev is searched from bdev name. This also involves taking
a fresh reference on dax_dev and putting that reference at the end of
function.

We are developing a new filesystem virtio-fs and using dax to access host
page cache directly. But there is no block device. IOW, we want to make
use of dax but want to get rid of this assumption that there is always
a block device associated with dax_dev.

So pass in "struct dax_device" as parameter instead of bdev.

ext2/ext4/xfs are current users and they already have a reference on
dax_device. So there is no need to take reference and drop reference to
dax_device on each call of this function.

Suggested-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Link: https://lore.kernel.org/r/20200103183307.GB13350@redhat.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2020-01-03 11:13:12 -08:00
..
acl.c ext2: cache NULL when both default_acl and acl are NULL 2018-09-03 11:05:03 +02:00
acl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
balloc.c ext2: fix improper function comment 2019-11-07 12:35:27 +01:00
dir.c ext2: use common file type conversion 2019-01-21 17:48:17 +01:00
ext2.h ext2: introduce new helper ext2_group_last_block_no() 2019-11-06 16:25:12 +01:00
file.c ext2: support statx syscall 2019-02-18 15:14:43 +01:00
ialloc.c ext2: add missing brelse() in ext2_new_inode() 2019-05-30 13:35:32 +02:00
inode.c dax: Pass dax_dev instead of bdev to dax_writeback_mapping_range() 2020-01-03 11:13:12 -08:00
ioctl.c ext2: return error when fail to allocating memory in ioctl 2019-10-24 09:24:40 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
namei.c ext2: support statx syscall 2019-02-18 15:14:43 +01:00
super.c ext2: code cleanup for descriptor_loc() 2019-11-19 17:04:38 +01:00
symlink.c ext2: support statx syscall 2019-02-18 15:14:43 +01:00
xattr_security.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xattr_trusted.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xattr_user.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xattr.c ext2: fix block range in ext2_data_block_valid() 2019-07-31 12:04:42 +02:00
xattr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00