aboutsummaryrefslogtreecommitdiff
path: root/fs/sdcardfs/inode.c
diff options
context:
space:
mode:
authorDaniel Rosenberg <drosen@google.com>2018-01-23 14:34:38 -0800
committerMoyster <oysterized@gmail.com>2018-01-30 15:45:45 +0100
commit1011044707a4b9b886edd2e17546fe2d32651dfe (patch)
treeeede1a15ed4a123f8822fcf98b61182e2f984da4 /fs/sdcardfs/inode.c
parente17ebbd6e73a305e9a7c133d9e7b1aa41c76da80 (diff)
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 <drosen@google.com> Bug: 35848445
Diffstat (limited to 'fs/sdcardfs/inode.c')
-rwxr-xr-xfs/sdcardfs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/sdcardfs/inode.c b/fs/sdcardfs/inode.c
index 3c3c343d9..b19c7ccd9 100755
--- a/fs/sdcardfs/inode.c
+++ b/fs/sdcardfs/inode.c
@@ -638,6 +638,8 @@ static int sdcardfs_permission(struct vfsmount *mnt, struct inode *inode, int ma
struct inode tmp;
struct sdcardfs_inode_data *top = top_data_get(SDCARDFS_I(inode));
+ if (IS_ERR(mnt))
+ return PTR_ERR(mnt);
if (!top)
return -EINVAL;