Lines 44-50
Link Here
|
44 |
static int InodeOpReadlink(struct dentry *, char __user *, int); |
44 |
static int InodeOpReadlink(struct dentry *, char __user *, int); |
45 |
#endif |
45 |
#endif |
46 |
|
46 |
|
47 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) |
47 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) |
|
|
48 |
static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie); |
49 |
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) |
48 |
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd); |
50 |
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd); |
49 |
#else |
51 |
#else |
50 |
static int InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd); |
52 |
static int InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd); |
Lines 221-233
Link Here
|
221 |
*---------------------------------------------------------------------------- |
223 |
*---------------------------------------------------------------------------- |
222 |
*/ |
224 |
*/ |
223 |
|
225 |
|
224 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) |
226 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) |
225 |
static void * |
227 |
static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie) |
|
|
228 |
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) |
229 |
static void * InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink |
230 |
struct nameidata *nd) // OUT: stores result |
226 |
#else |
231 |
#else |
227 |
static int |
232 |
static int InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink |
228 |
#endif |
|
|
229 |
InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink |
230 |
struct nameidata *nd) // OUT: stores result |
233 |
struct nameidata *nd) // OUT: stores result |
|
|
234 |
#endif |
231 |
{ |
235 |
{ |
232 |
int ret; |
236 |
int ret; |
233 |
VMBlockInodeInfo *iinfo; |
237 |
VMBlockInodeInfo *iinfo; |
Lines 244-250
Link Here
|
244 |
goto out; |
248 |
goto out; |
245 |
} |
249 |
} |
246 |
|
250 |
|
|
|
251 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) |
252 |
return *cookie = (char *)(iinfo->name); |
253 |
#else |
247 |
nd_set_link(nd, iinfo->name); |
254 |
nd_set_link(nd, iinfo->name); |
|
|
255 |
#endif |
248 |
|
256 |
|
249 |
out: |
257 |
out: |
250 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) |
258 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) |