Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37bc1539 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Al Viro
Browse files

fs: make posix_acl_create more useful



Rename the current posix_acl_created to __posix_acl_create and add
a fully featured helper to set up the ACLs on file creation that
uses get_acl().

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 5bf3258f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ int v9fs_acl_mode(struct inode *dir, umode_t *modep,
	if (acl) {
		if (S_ISDIR(mode))
			*dpacl = posix_acl_dup(acl);
		retval = posix_acl_create(&acl, GFP_NOFS, &mode);
		retval = __posix_acl_create(&acl, GFP_NOFS, &mode);
		if (retval < 0)
			return retval;
		if (retval > 0)
+1 −1
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ int btrfs_init_acl(struct btrfs_trans_handle *trans,
			if (ret)
				goto failed;
		}
		ret = posix_acl_create(&acl, GFP_NOFS, &inode->i_mode);
		ret = __posix_acl_create(&acl, GFP_NOFS, &inode->i_mode);
		if (ret < 0)
			return ret;

+1 −1
Original line number Diff line number Diff line
@@ -268,7 +268,7 @@ ext2_init_acl(struct inode *inode, struct inode *dir)
			if (error)
				goto cleanup;
		}
		error = posix_acl_create(&acl, GFP_KERNEL, &inode->i_mode);
		error = __posix_acl_create(&acl, GFP_KERNEL, &inode->i_mode);
		if (error < 0)
			return error;
		if (error > 0) {
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ ext3_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
			if (error)
				goto cleanup;
		}
		error = posix_acl_create(&acl, GFP_NOFS, &inode->i_mode);
		error = __posix_acl_create(&acl, GFP_NOFS, &inode->i_mode);
		if (error < 0)
			return error;

+1 −1
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
			if (error)
				goto cleanup;
		}
		error = posix_acl_create(&acl, GFP_NOFS, &inode->i_mode);
		error = __posix_acl_create(&acl, GFP_NOFS, &inode->i_mode);
		if (error < 0)
			return error;

Loading