From: Daniel Rosenberg Date: Tue, 23 Jan 2018 22:34:38 +0000 (-0800) Subject: ANDROID: xattr: Pass EOPNOTSUPP to permission2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13d98fd55be7f13407f90756ee92b34a2c8dead8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ANDROID: xattr: Pass EOPNOTSUPP to permission2 The permission call for xattr operations happens regardless of whether or not the xattr functions are implemented. The xattr functions currently don't have support for permission2. Passing EOPNOTSUPP as the mount point in xattr_permission allows us to return EOPNOTSUPP early in permission2, if the filesystem supports it. Change-Id: I9d07e4cd633cf40af60450ffbff7ac5c1b4e8c2c Signed-off-by: Daniel Rosenberg Bug: 35848445 --- diff --git a/fs/xattr.c b/fs/xattr.c index 61cd28ba25f3..bf6f6e761b88 100644 --- a/fs/xattr.c +++ b/fs/xattr.c @@ -131,7 +131,7 @@ xattr_permission(struct inode *inode, const char *name, int mask) return -EPERM; } - return inode_permission(inode, mask); + return inode_permission2(ERR_PTR(-EOPNOTSUPP), inode, mask); } int