Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- inode.c 2014-03-21 15:37:16.000000000 -0700
- +++ inode.c-new 2014-07-17 14:20:50.202233706 -0700
- @@ -31,6 +31,9 @@
- #include <linux/namei.h>
- #endif
- #include <linux/highmem.h>
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
- +#include <linux/dcache.h>
- +#endif
- #include "compat_cred.h"
- #include "compat_dcache.h"
- @@ -1923,7 +1926,11 @@ HgfsPermission(struct inode *inode,
- #endif
- &inode->i_dentry,
- d_alias) {
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
- + int dcount = d_count(dentry);
- +#else
- int dcount = hgfs_d_count(dentry);
- +#endif
- if (dcount) {
- LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount));
- return HgfsAccessInt(dentry, mask & (MAY_READ | MAY_WRITE | MAY_EXEC));
- @@ -1976,7 +1983,11 @@ HgfsPermission(struct inode *inode,
- list_for_each(pos, &inode->i_dentry) {
- int dcount;
- struct dentry *dentry = list_entry(pos, struct dentry, d_alias);
- - dcount = hgfs_d_count(dentry);
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
- + dcount = d_count(entry);
- +#else
- + dcount = compat_d_count(dentry);
- +#endif
- if (dcount) {
- LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount));
- return HgfsAccessInt(dentry, mask & (MAY_READ | MAY_WRITE | MAY_EXEC));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement