super.c (d27998185da8fbdc35911307ae13518d168778d7) super.c (569d0365f571fa6421a5c80bc30d1b2cdab857fe)
1/*
2 * Copyright(c) 2017 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 */
13#include <linux/pagemap.h>
14#include <linux/module.h>
15#include <linux/mount.h>
16#include <linux/magic.h>
17#include <linux/genhd.h>
1/*
2 * Copyright(c) 2017 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 */
13#include <linux/pagemap.h>
14#include <linux/module.h>
15#include <linux/mount.h>
16#include <linux/magic.h>
17#include <linux/genhd.h>
18#include <linux/pfn_t.h>
18#include <linux/cdev.h>
19#include <linux/hash.h>
20#include <linux/slab.h>
21#include <linux/uio.h>
22#include <linux/dax.h>
23#include <linux/fs.h>
24
25static dev_t dax_devt;

--- 92 unchanged lines hidden (view full) ---

118 put_dax(dax_dev);
119
120 if (len < 1) {
121 pr_debug("VFS (%s): error: dax access failed (%ld)\n",
122 sb->s_id, len);
123 return len < 0 ? len : -EIO;
124 }
125
19#include <linux/cdev.h>
20#include <linux/hash.h>
21#include <linux/slab.h>
22#include <linux/uio.h>
23#include <linux/dax.h>
24#include <linux/fs.h>
25
26static dev_t dax_devt;

--- 92 unchanged lines hidden (view full) ---

119 put_dax(dax_dev);
120
121 if (len < 1) {
122 pr_debug("VFS (%s): error: dax access failed (%ld)\n",
123 sb->s_id, len);
124 return len < 0 ? len : -EIO;
125 }
126
127 if ((IS_ENABLED(CONFIG_FS_DAX_LIMITED) && pfn_t_special(pfn))
128 || pfn_t_devmap(pfn))
129 /* pass */;
130 else {
131 pr_debug("VFS (%s): error: dax support not enabled\n",
132 sb->s_id);
133 return -EOPNOTSUPP;
134 }
135
126 return 0;
127}
128EXPORT_SYMBOL_GPL(__bdev_dax_supported);
129#endif
130
131enum dax_device_flags {
132 /* !alive + rcu grace period == no new operations / mappings */
133 DAXDEV_ALIVE,

--- 495 unchanged lines hidden ---
136 return 0;
137}
138EXPORT_SYMBOL_GPL(__bdev_dax_supported);
139#endif
140
141enum dax_device_flags {
142 /* !alive + rcu grace period == no new operations / mappings */
143 DAXDEV_ALIVE,

--- 495 unchanged lines hidden ---