fs-aufs-4.9-posix_acl.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. diff -Nuar linux-4.9.orig/fs/aufs/posix_acl.c linux-4.9/fs/aufs/posix_acl.c
  2. --- linux-4.9.orig/fs/aufs/posix_acl.c 2017-04-09 09:33:00.155052337 +0300
  3. +++ linux-4.9/fs/aufs/posix_acl.c 2017-04-09 09:34:03.760053849 +0300
  4. @@ -1,5 +1,18 @@
  5. /*
  6. * Copyright (C) 2014-2016 Junjiro R. Okajima
  7. + *
  8. + * This program, aufs is free software; you can redistribute it and/or modify
  9. + * it under the terms of the GNU General Public License as published by
  10. + * the Free Software Foundation; either version 2 of the License, or
  11. + * (at your option) any later version.
  12. + *
  13. + * This program is distributed in the hope that it will be useful,
  14. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. + * GNU General Public License for more details.
  17. + *
  18. + * You should have received a copy of the GNU General Public License
  19. + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. /*
  22. @@ -36,6 +49,8 @@
  23. /* always topmost only */
  24. acl = get_acl(h_inode, type);
  25. + if (!IS_ERR_OR_NULL(acl))
  26. + set_cached_acl(inode, type, acl);
  27. out:
  28. ii_read_unlock(inode);
  29. @@ -77,8 +92,10 @@
  30. ssz = au_sxattr(dentry, inode, &arg);
  31. dput(dentry);
  32. err = ssz;
  33. - if (ssz >= 0)
  34. + if (ssz >= 0) {
  35. err = 0;
  36. + set_cached_acl(inode, type, acl);
  37. + }
  38. out:
  39. return err;
  40. diff -Nuar linux-4.9.orig/fs/aufs/xattr.c linux-4.9/fs/aufs/xattr.c
  41. --- linux-4.9.orig/fs/aufs/xattr.c 2017-04-09 09:33:00.160052337 +0300
  42. +++ linux-4.9/fs/aufs/xattr.c 2017-04-09 09:34:08.757053967 +0300
  43. @@ -1,11 +1,26 @@
  44. /*
  45. * Copyright (C) 2014-2016 Junjiro R. Okajima
  46. + *
  47. + * This program, aufs is free software; you can redistribute it and/or modify
  48. + * it under the terms of the GNU General Public License as published by
  49. + * the Free Software Foundation; either version 2 of the License, or
  50. + * (at your option) any later version.
  51. + *
  52. + * This program is distributed in the hope that it will be useful,
  53. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  54. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  55. + * GNU General Public License for more details.
  56. + *
  57. + * You should have received a copy of the GNU General Public License
  58. + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  59. */
  60. /*
  61. * handling xattr functions
  62. */
  63. +#include <linux/fs.h>
  64. +#include <linux/posix_acl_xattr.h>
  65. #include <linux/xattr.h>
  66. #include "aufs.h"
  67. @@ -309,7 +324,11 @@
  68. };
  69. static const struct xattr_handler *au_xattr_handlers[] = {
  70. - &au_xattr_handler,
  71. +#ifdef CONFIG_FS_POSIX_ACL
  72. + &posix_acl_access_xattr_handler,
  73. + &posix_acl_default_xattr_handler,
  74. +#endif
  75. + &au_xattr_handler, /* must be last */
  76. NULL
  77. };