]>
Commit | Line | Data |
---|---|---|
beeed459 BB |
1 | dnl # |
2 | dnl # Supported symlink APIs | |
3 | dnl # | |
608f8749 BB |
4 | AC_DEFUN([ZFS_AC_KERNEL_SRC_PUT_LINK], [ |
5 | ZFS_LINUX_TEST_SRC([put_link_cookie], [ | |
6 | #include <linux/fs.h> | |
7 | void put_link(struct inode *ip, void *cookie) | |
8 | { return; } | |
9 | static struct inode_operations | |
10 | iops __attribute__ ((unused)) = { | |
11 | .put_link = put_link, | |
12 | }; | |
13 | ],[]) | |
14 | ||
15 | ZFS_LINUX_TEST_SRC([put_link_nameidata], [ | |
16 | #include <linux/fs.h> | |
17 | void put_link(struct dentry *de, struct | |
18 | nameidata *nd, void *ptr) { return; } | |
19 | static struct inode_operations | |
20 | iops __attribute__ ((unused)) = { | |
21 | .put_link = put_link, | |
22 | }; | |
23 | ],[]) | |
24 | ]) | |
25 | ||
beeed459 BB |
26 | AC_DEFUN([ZFS_AC_KERNEL_PUT_LINK], [ |
27 | dnl # | |
28 | dnl # 4.5 API change | |
29 | dnl # get_link() uses delayed done, there is no put_link() interface. | |
608f8749 | 30 | dnl # This check intially uses the inode_operations_get_link result |
beeed459 | 31 | dnl # |
608f8749 | 32 | ZFS_LINUX_TEST_RESULT([inode_operations_get_link], [ |
beeed459 BB |
33 | AC_DEFINE(HAVE_PUT_LINK_DELAYED, 1, [iops->put_link() delayed]) |
34 | ],[ | |
35 | dnl # | |
36 | dnl # 4.2 API change | |
37 | dnl # This kernel retired the nameidata structure. | |
38 | dnl # | |
39 | AC_MSG_CHECKING([whether iops->put_link() passes cookie]) | |
608f8749 | 40 | ZFS_LINUX_TEST_RESULT([put_link_cookie], [ |
beeed459 BB |
41 | AC_MSG_RESULT(yes) |
42 | AC_DEFINE(HAVE_PUT_LINK_COOKIE, 1, | |
43 | [iops->put_link() cookie]) | |
44 | ],[ | |
608f8749 BB |
45 | AC_MSG_RESULT(no) |
46 | ||
beeed459 BB |
47 | dnl # |
48 | dnl # 2.6.32 API | |
49 | dnl # | |
beeed459 BB |
50 | AC_MSG_CHECKING( |
51 | [whether iops->put_link() passes nameidata]) | |
608f8749 | 52 | ZFS_LINUX_TEST_RESULT([put_link_nameidata], [ |
beeed459 BB |
53 | AC_MSG_RESULT(yes) |
54 | AC_DEFINE(HAVE_PUT_LINK_NAMEIDATA, 1, | |
55 | [iops->put_link() nameidata]) | |
56 | ],[ | |
608f8749 | 57 | ZFS_LINUX_TEST_ERROR([put_link]) |
beeed459 BB |
58 | ]) |
59 | ]) | |
60 | ]) | |
61 | ]) |