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