2014-10-26 18:15:24 +03:00
|
|
|
starting with kernel 3.6, d_revalidate takes an unsigned int "flags"
|
|
|
|
as the second argument, not a nameidata pointer! see fs/namei.c
|
|
|
|
for implementation. Also changing vfs_follow_link to nd_set_link.
|
|
|
|
See: https://lkml.org/lkml/2013/9/9/236
|
|
|
|
|
|
|
|
diff -Naur vmblock-only/linux/inode.c vmblock-only/linux/inode.c
|
|
|
|
--- vmblock-only/linux/inode.c 2013-11-05 23:33:26.000000000 -0500
|
|
|
|
+++ vmblock-only/linux/inode.c 2014-04-26 10:58:03.063635343 -0400
|
2014-10-17 21:35:43 +04:00
|
|
|
@@ -36,7 +36,7 @@
|
|
|
|
|
|
|
|
/* Inode operations */
|
|
|
|
static struct dentry *InodeOpLookup(struct inode *dir,
|
|
|
|
- struct dentry *dentry, struct nameidata *nd);
|
|
|
|
+ struct dentry *dentry, unsigned int flags);
|
|
|
|
static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
|
|
|
|
static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
|
|
|
|
@@ -75,7 +75,7 @@
|
|
|
|
static struct dentry *
|
|
|
|
InodeOpLookup(struct inode *dir, // IN: parent directory's inode
|
|
|
|
struct dentry *dentry, // IN: dentry to lookup
|
|
|
|
- struct nameidata *nd) // IN: lookup intent and information
|
2014-10-26 18:15:24 +03:00
|
|
|
+ unsigned int flags) // IN: lookup intent and information
|
2014-10-17 21:35:43 +04:00
|
|
|
{
|
|
|
|
char *filename;
|
|
|
|
struct inode *inode;
|
2014-10-26 18:15:24 +03:00
|
|
|
@@ -221,7 +221,8 @@
|
2014-10-17 21:35:43 +04:00
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
|
|
|
|
- ret = vfs_follow_link(nd, iinfo->name);
|
|
|
|
+ nd_set_link(nd, iinfo->name);
|
2014-10-26 18:15:24 +03:00
|
|
|
+ ret = 0;
|
2014-10-17 21:35:43 +04:00
|
|
|
|
|
|
|
out:
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
|