|
@@ -351,13 +351,11 @@ static int f2fs_acl_create(struct inode *dir, umode_t *mode,
|
|
|
|
|
|
*acl = f2fs_acl_clone(p, GFP_NOFS);
|
|
*acl = f2fs_acl_clone(p, GFP_NOFS);
|
|
if (!*acl)
|
|
if (!*acl)
|
|
- return -ENOMEM;
|
|
|
|
|
|
+ goto no_mem;
|
|
|
|
|
|
ret = f2fs_acl_create_masq(*acl, mode);
|
|
ret = f2fs_acl_create_masq(*acl, mode);
|
|
- if (ret < 0) {
|
|
|
|
- posix_acl_release(*acl);
|
|
|
|
- return -ENOMEM;
|
|
|
|
- }
|
|
|
|
|
|
+ if (ret < 0)
|
|
|
|
+ goto no_mem_clone;
|
|
|
|
|
|
if (ret == 0) {
|
|
if (ret == 0) {
|
|
posix_acl_release(*acl);
|
|
posix_acl_release(*acl);
|
|
@@ -378,6 +376,12 @@ no_acl:
|
|
*default_acl = NULL;
|
|
*default_acl = NULL;
|
|
*acl = NULL;
|
|
*acl = NULL;
|
|
return 0;
|
|
return 0;
|
|
|
|
+
|
|
|
|
+no_mem_clone:
|
|
|
|
+ posix_acl_release(*acl);
|
|
|
|
+no_mem:
|
|
|
|
+ posix_acl_release(p);
|
|
|
|
+ return -ENOMEM;
|
|
}
|
|
}
|
|
|
|
|
|
int f2fs_init_acl(struct inode *inode, struct inode *dir, struct page *ipage,
|
|
int f2fs_init_acl(struct inode *inode, struct inode *dir, struct page *ipage,
|