Lines 44-54
static struct dentry *InodeOpLookup(stru
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 |
static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie); |
48 |
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd); |
48 |
|
49 |
#else |
|
|
50 |
static int InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd); |
51 |
#endif |
52 |
|
49 |
|
53 |
|
50 |
|
54 |
struct inode_operations RootInodeOps = { |
51 |
struct inode_operations RootInodeOps = { |
Lines 220-233
InodeOpReadlink(struct dentry *dentry,
Link Here
|
220 |
* |
217 |
* |
221 |
*---------------------------------------------------------------------------- |
218 |
*---------------------------------------------------------------------------- |
222 |
*/ |
219 |
*/ |
223 |
|
220 |
static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie) |
224 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) |
|
|
225 |
static void * |
226 |
#else |
227 |
static int |
228 |
#endif |
229 |
InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink |
230 |
struct nameidata *nd) // OUT: stores result |
231 |
{ |
221 |
{ |
232 |
int ret; |
222 |
int ret; |
233 |
VMBlockInodeInfo *iinfo; |
223 |
VMBlockInodeInfo *iinfo; |
Lines 244-250
InodeOpFollowlink(struct dentry *dentry,
Link Here
|
244 |
goto out; |
234 |
goto out; |
245 |
} |
235 |
} |
246 |
|
236 |
|
247 |
nd_set_link(nd, iinfo->name); |
237 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) |
|
|
238 |
return *cookie = (char *)(iinfo->name); |
239 |
#else |
240 |
nd_set_link(nd, iinfo->name); |
241 |
#endif |
248 |
|
242 |
|
249 |
out: |
243 |
out: |
250 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) |
244 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) |