diff options
author | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
commit | 05e97a9eda72d58dba293857df6aac62584ef99a (patch) | |
tree | e86e692f26d4879ff2210c54722e2b7780210249 /include/linux/dax.h | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
parent | d4ed3b9015b5eebc90d629579d9e7944607cbae5 (diff) |
Merge tag 'nand/fixes-for-4.12-rc3' of git://git.infradead.org/linux-mtd into MTD
From Boris:
"""
This pull request contains several fixes to the core and the tango
driver.
tango fixes:
* Add missing MODULE_DEVICE_TABLE() in tango_nand.c
* Update the number of corrected bitflips
core fixes:
* Fix a long standing memory leak in nand_scan_tail()
* Fix several bugs introduced by the per-vendor init/detection
infrastructure (introduced in 4.12)
* Add a static specifier to nand_ooblayout_lp_hamming_ops definition
"""
Diffstat (limited to 'include/linux/dax.h')
-rw-r--r-- | include/linux/dax.h | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/include/linux/dax.h b/include/linux/dax.h index 00ebac854bb7..5ec1f6c47716 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h | |||
@@ -18,6 +18,20 @@ struct dax_operations { | |||
18 | void **, pfn_t *); | 18 | void **, pfn_t *); |
19 | }; | 19 | }; |
20 | 20 | ||
21 | #if IS_ENABLED(CONFIG_DAX) | ||
22 | struct dax_device *dax_get_by_host(const char *host); | ||
23 | void put_dax(struct dax_device *dax_dev); | ||
24 | #else | ||
25 | static inline struct dax_device *dax_get_by_host(const char *host) | ||
26 | { | ||
27 | return NULL; | ||
28 | } | ||
29 | |||
30 | static inline void put_dax(struct dax_device *dax_dev) | ||
31 | { | ||
32 | } | ||
33 | #endif | ||
34 | |||
21 | int bdev_dax_pgoff(struct block_device *, sector_t, size_t, pgoff_t *pgoff); | 35 | int bdev_dax_pgoff(struct block_device *, sector_t, size_t, pgoff_t *pgoff); |
22 | #if IS_ENABLED(CONFIG_FS_DAX) | 36 | #if IS_ENABLED(CONFIG_FS_DAX) |
23 | int __bdev_dax_supported(struct super_block *sb, int blocksize); | 37 | int __bdev_dax_supported(struct super_block *sb, int blocksize); |
@@ -25,23 +39,29 @@ static inline int bdev_dax_supported(struct super_block *sb, int blocksize) | |||
25 | { | 39 | { |
26 | return __bdev_dax_supported(sb, blocksize); | 40 | return __bdev_dax_supported(sb, blocksize); |
27 | } | 41 | } |
42 | |||
43 | static inline struct dax_device *fs_dax_get_by_host(const char *host) | ||
44 | { | ||
45 | return dax_get_by_host(host); | ||
46 | } | ||
47 | |||
48 | static inline void fs_put_dax(struct dax_device *dax_dev) | ||
49 | { | ||
50 | put_dax(dax_dev); | ||
51 | } | ||
52 | |||
28 | #else | 53 | #else |
29 | static inline int bdev_dax_supported(struct super_block *sb, int blocksize) | 54 | static inline int bdev_dax_supported(struct super_block *sb, int blocksize) |
30 | { | 55 | { |
31 | return -EOPNOTSUPP; | 56 | return -EOPNOTSUPP; |
32 | } | 57 | } |
33 | #endif | ||
34 | 58 | ||
35 | #if IS_ENABLED(CONFIG_DAX) | 59 | static inline struct dax_device *fs_dax_get_by_host(const char *host) |
36 | struct dax_device *dax_get_by_host(const char *host); | ||
37 | void put_dax(struct dax_device *dax_dev); | ||
38 | #else | ||
39 | static inline struct dax_device *dax_get_by_host(const char *host) | ||
40 | { | 60 | { |
41 | return NULL; | 61 | return NULL; |
42 | } | 62 | } |
43 | 63 | ||
44 | static inline void put_dax(struct dax_device *dax_dev) | 64 | static inline void fs_put_dax(struct dax_device *dax_dev) |
45 | { | 65 | { |
46 | } | 66 | } |
47 | #endif | 67 | #endif |