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

Commit a34a50ab authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ANDROID: regression introduced override_creds=off"

parents 0bb3dc98 c560dd73
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -540,7 +540,7 @@ static int ovl_create_or_link(struct dentry *dentry, struct inode *inode,
			      struct ovl_cattr *attr, bool origin)
{
	int err;
	const struct cred *old_cred;
	const struct cred *old_cred, *hold_cred = NULL;
	struct cred *override_cred;
	struct dentry *parent = dentry->d_parent;

@@ -575,7 +575,7 @@ static int ovl_create_or_link(struct dentry *dentry, struct inode *inode,
				goto out_revert_creds;
			}
		}
		put_cred(override_creds(override_cred));
		hold_cred = override_creds(override_cred);
		put_cred(override_cred);

		if (!ovl_dentry_is_whiteout(dentry))
@@ -584,7 +584,9 @@ static int ovl_create_or_link(struct dentry *dentry, struct inode *inode,
			err = ovl_create_over_whiteout(dentry, inode, attr);
	}
out_revert_creds:
	ovl_revert_creds(old_cred);
	ovl_revert_creds(old_cred ?: hold_cred);
	if (old_cred && hold_cred)
		put_cred(hold_cred);
	return err;
}