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

Commit 3c00ef96 authored by Dennis Cagle's avatar Dennis Cagle Committed by Gerrit - the friendly Code Review server
Browse files

acl: Reapply previous fix for leaks



Merge commit ad95c945 ("Merge tag 'google-common-android-3.18' into
'msm-3.18'") inadvertantly reverted portions of commit 4333a7d3
("ANDROID: fix acl leaks"). Reapply the portions of the fix that were
reverted.

Change-Id: I5773b28bb68d31deecf374b480a38622c59d8e9c
Signed-off-by: default avatarDennis Cagle <dcagle@codeaurora.org>
parent 8f09bb72
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -81,7 +81,8 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
		struct posix_acl *old_acl = acl;
		error = posix_acl_update_mode(inode, &inode->i_mode, &acl);

		error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
		if (!acl)
			posix_acl_release(old_acl);
		if (error)
			return error;
		if (mode != inode->i_mode)
+3 −1
Original line number Diff line number Diff line
@@ -287,8 +287,10 @@ xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)

	if (type == ACL_TYPE_ACCESS) {
		umode_t mode;

		struct posix_acl *old_acl = acl;
		error = posix_acl_update_mode(inode, &mode, &acl);
		if (!acl)
			posix_acl_release(old_acl);
		if (error)
			return error;
		error = xfs_set_mode(inode, mode);