Advertisement
Guest User

Untitled

a guest
May 27th, 2015
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. --- inode.c 2014-03-21 15:37:16.000000000 -0700
  2. +++ inode.c-new 2014-07-17 14:20:50.202233706 -0700
  3. @@ -31,6 +31,9 @@
  4. #include <linux/namei.h>
  5. #endif
  6. #include <linux/highmem.h>
  7. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
  8. +#include <linux/dcache.h>
  9. +#endif
  10.  
  11. #include "compat_cred.h"
  12. #include "compat_dcache.h"
  13. @@ -1923,7 +1926,11 @@ HgfsPermission(struct inode *inode,
  14. #endif
  15. &inode->i_dentry,
  16. d_alias) {
  17. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
  18. + int dcount = d_count(dentry);
  19. +#else
  20. int dcount = hgfs_d_count(dentry);
  21. +#endif
  22. if (dcount) {
  23. LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount));
  24. return HgfsAccessInt(dentry, mask & (MAY_READ | MAY_WRITE | MAY_EXEC));
  25. @@ -1976,7 +1983,11 @@ HgfsPermission(struct inode *inode,
  26. list_for_each(pos, &inode->i_dentry) {
  27. int dcount;
  28. struct dentry *dentry = list_entry(pos, struct dentry, d_alias);
  29. - dcount = hgfs_d_count(dentry);
  30. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
  31. + dcount = d_count(entry);
  32. +#else
  33. + dcount = compat_d_count(dentry);
  34. +#endif
  35. if (dcount) {
  36. LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount));
  37. return HgfsAccessInt(dentry, mask & (MAY_READ | MAY_WRITE | MAY_EXEC));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement