summaryrefslogtreecommitdiffstats
path: root/fs/posix_acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/posix_acl.c')
-rw-r--r--fs/posix_acl.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/posix_acl.c b/fs/posix_acl.c
index 0aa9f1676726..365a0712da6a 100644
--- a/fs/posix_acl.c
+++ b/fs/posix_acl.c
@@ -388,6 +388,24 @@ posix_acl_chmod_masq(struct posix_acl *acl, mode_t mode)
}
int
+posix_acl_create(struct posix_acl **acl, gfp_t gfp, mode_t *mode_p)
+{
+ struct posix_acl *clone = posix_acl_clone(*acl, gfp);
+ int err = -ENOMEM;
+ if (clone) {
+ err = posix_acl_create_masq(clone, mode_p);
+ if (err < 0) {
+ posix_acl_release(clone);
+ clone = NULL;
+ }
+ }
+ posix_acl_release(*acl);
+ *acl = clone;
+ return err;
+}
+EXPORT_SYMBOL(posix_acl_create);
+
+int
posix_acl_chmod(struct posix_acl **acl, gfp_t gfp, mode_t mode)
{
struct posix_acl *clone = posix_acl_clone(*acl, gfp);