diff options
author | Daniel Rosenberg <drosen@google.com> | 2018-01-18 16:17:16 -0800 |
---|---|---|
committer | Daniel Rosenberg <drosen@google.com> | 2018-01-19 23:07:11 +0000 |
commit | 3fc4284df70b6a79a7d8e2c69c55a62a1c37c8a2 (patch) | |
tree | fc9a643db8527b8a043aafd1283dc035ca1c5633 /fs/sdcardfs/inode.c | |
parent | d96d95dd1d8bf37426911169c242d3699b6f3245 (diff) |
ANDROID: sdcardfs: Move default_normal to superblock
Moving default_normal from mount info to superblock info
as it doesn't need to change between mount points.
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 72158116
Change-Id: I16c6a0577c601b4f7566269f7e189fcf697afd4e
Diffstat (limited to 'fs/sdcardfs/inode.c')
-rw-r--r-- | fs/sdcardfs/inode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/sdcardfs/inode.c b/fs/sdcardfs/inode.c index 85eb8ebb5372..36c36590bcea 100644 --- a/fs/sdcardfs/inode.c +++ b/fs/sdcardfs/inode.c @@ -641,7 +641,7 @@ static int sdcardfs_permission(struct vfsmount *mnt, struct inode *inode, int ma */ copy_attrs(&tmp, inode); tmp.i_uid = make_kuid(&init_user_ns, top->d_uid); - tmp.i_gid = make_kgid(&init_user_ns, get_gid(mnt, top)); + tmp.i_gid = make_kgid(&init_user_ns, get_gid(mnt, inode->i_sb, top)); tmp.i_mode = (inode->i_mode & S_IFMT) | get_mode(mnt, SDCARDFS_I(inode), top); data_put(top); @@ -718,7 +718,7 @@ static int sdcardfs_setattr(struct vfsmount *mnt, struct dentry *dentry, struct */ copy_attrs(&tmp, inode); tmp.i_uid = make_kuid(&init_user_ns, top->d_uid); - tmp.i_gid = make_kgid(&init_user_ns, get_gid(mnt, top)); + tmp.i_gid = make_kgid(&init_user_ns, get_gid(mnt, dentry->d_sb, top)); tmp.i_mode = (inode->i_mode & S_IFMT) | get_mode(mnt, SDCARDFS_I(inode), top); tmp.i_size = i_size_read(inode); @@ -819,6 +819,7 @@ static int sdcardfs_fillattr(struct vfsmount *mnt, { struct sdcardfs_inode_info *info = SDCARDFS_I(inode); struct sdcardfs_inode_data *top = top_data_get(info); + struct super_block *sb = inode->i_sb; if (!top) return -EINVAL; @@ -828,7 +829,7 @@ static int sdcardfs_fillattr(struct vfsmount *mnt, stat->mode = (inode->i_mode & S_IFMT) | get_mode(mnt, info, top); stat->nlink = inode->i_nlink; stat->uid = make_kuid(&init_user_ns, top->d_uid); - stat->gid = make_kgid(&init_user_ns, get_gid(mnt, top)); + stat->gid = make_kgid(&init_user_ns, get_gid(mnt, sb, top)); stat->rdev = inode->i_rdev; stat->size = i_size_read(inode); stat->atime = inode->i_atime; |