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

Commit 95c265f6 authored by Amit Pundir's avatar Amit Pundir
Browse files

ANDROID: sdcardfs: Propagate dentry down to inode_change_ok()



Since commit 31051c85 ("fs: Give dentry to inode_change_ok()
instead of inode"), to avoid clearing of capabilities or security
related extended attributes too early, inode_change_ok() will
need to take dentry instead of inode. Propagate it down to
sdcardfs_setattr() and also rename it to setattr_prepare().

Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
parent 66aa71cc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -637,11 +637,11 @@ static int sdcardfs_setattr(struct dentry *dentry, struct iattr *ia)
	inode = d_inode(dentry);

	/*
	 * Check if user has permission to change inode.  We don't check if
	 * Check if user has permission to change dentry.  We don't check if
	 * this user can change the lower inode: that should happen when
	 * calling notify_change on the lower inode.
	 */
	err = inode_change_ok(inode, ia);
	err = setattr_prepare(dentry, ia);

	/* no vfs_XXX operations required, cred overriding will be skipped. wj*/
	if (!err) {