Files
main/kernel/tools/perf/files/patches/fs-aufs-4.9-posix_acl.patch
T
Idris Kalp 2faef952db perf 5.10.3
2020-12-27 20:48:11 +03:00

87 lines
2.6 KiB
Diff

diff -Nuar linux-4.9.orig/fs/aufs/posix_acl.c linux-4.9/fs/aufs/posix_acl.c
--- linux-4.9.orig/fs/aufs/posix_acl.c 2017-04-09 09:33:00.155052337 +0300
+++ linux-4.9/fs/aufs/posix_acl.c 2017-04-09 09:34:03.760053849 +0300
@@ -1,5 +1,18 @@
/*
* Copyright (C) 2014-2016 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@@ -36,6 +49,8 @@
/* always topmost only */
acl = get_acl(h_inode, type);
+ if (!IS_ERR_OR_NULL(acl))
+ set_cached_acl(inode, type, acl);
out:
ii_read_unlock(inode);
@@ -77,8 +92,10 @@
ssz = au_sxattr(dentry, inode, &arg);
dput(dentry);
err = ssz;
- if (ssz >= 0)
+ if (ssz >= 0) {
err = 0;
+ set_cached_acl(inode, type, acl);
+ }
out:
return err;
diff -Nuar linux-4.9.orig/fs/aufs/xattr.c linux-4.9/fs/aufs/xattr.c
--- linux-4.9.orig/fs/aufs/xattr.c 2017-04-09 09:33:00.160052337 +0300
+++ linux-4.9/fs/aufs/xattr.c 2017-04-09 09:34:08.757053967 +0300
@@ -1,11 +1,26 @@
/*
* Copyright (C) 2014-2016 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* handling xattr functions
*/
+#include <linux/fs.h>
+#include <linux/posix_acl_xattr.h>
#include <linux/xattr.h>
#include "aufs.h"
@@ -309,7 +324,11 @@
};
static const struct xattr_handler *au_xattr_handlers[] = {
- &au_xattr_handler,
+#ifdef CONFIG_FS_POSIX_ACL
+ &posix_acl_access_xattr_handler,
+ &posix_acl_default_xattr_handler,
+#endif
+ &au_xattr_handler, /* must be last */
NULL
};