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

Commit 4333a7d3 authored by Mark Salyzyn's avatar Mark Salyzyn Committed by Dennis Cagle
Browse files

ANDROID: fix acl leaks



Fixes regressions associated with commit
073931017b49d9458aa351605b43a7e34598caef

Signed-off-by: default avatarMark Salyzyn <salyzyn@google.com>
Bug: 32458736
Change-Id: I6ee127dfdf3594d24ccd8560541ac554c5b05eb6
[d-cagle@codeaurora.org: Resolve merge conflicts]
Git-repo: https://android.googlesource.com/kernel/msm/


Git-commit: 74d0e4d3d96d0ca82d39635318a69d55e966b767
Signed-off-by: default avatarDennis Cagle <d-cagle@codeaurora.org>
parent 1413a742
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -78,8 +78,11 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)

	if (type == ACL_TYPE_ACCESS) {
		umode_t mode = inode->i_mode;

		struct posix_acl *old_acl = 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);