mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ANDROID: sdcardfs: Add option to not link obb
Add mount option unshared_obb to not link the obb folders of multiple users together. Bug: 27915347 Test: mount with option. Check if altering one obb alters the other Signed-off-by: Daniel Rosenberg <drosen@google.com> Change-Id: I3956e06bd0a222b0bbb2768c9a8a8372ada85e1e
This commit is contained in:
parent
5e5a0b5125
commit
5c4b88269c
3 changed files with 12 additions and 2 deletions
|
@ -351,7 +351,8 @@ int need_graft_path(struct dentry *dentry)
|
|||
struct sdcardfs_sb_info *sbi = SDCARDFS_SB(dentry->d_sb);
|
||||
struct qstr obb = QSTR_LITERAL("obb");
|
||||
|
||||
if (parent_info->data->perm == PERM_ANDROID &&
|
||||
if (!sbi->options.unshared_obb &&
|
||||
parent_info->data->perm == PERM_ANDROID &&
|
||||
qstr_case_eq(&dentry->d_name, &obb)) {
|
||||
|
||||
/* /Android/obb is the base obbpath of DERIVED_UNIFIED */
|
||||
|
|
|
@ -34,6 +34,7 @@ enum {
|
|||
Opt_reserved_mb,
|
||||
Opt_gid_derivation,
|
||||
Opt_default_normal,
|
||||
Opt_unshared_obb,
|
||||
Opt_err,
|
||||
};
|
||||
|
||||
|
@ -47,6 +48,7 @@ static const match_table_t sdcardfs_tokens = {
|
|||
{Opt_multiuser, "multiuser"},
|
||||
{Opt_gid_derivation, "derive_gid"},
|
||||
{Opt_default_normal, "default_normal"},
|
||||
{Opt_unshared_obb, "unshared_obb"},
|
||||
{Opt_reserved_mb, "reserved_mb=%u"},
|
||||
{Opt_err, NULL}
|
||||
};
|
||||
|
@ -128,6 +130,9 @@ static int parse_options(struct super_block *sb, char *options, int silent,
|
|||
case Opt_default_normal:
|
||||
vfsopts->default_normal = true;
|
||||
break;
|
||||
case Opt_unshared_obb:
|
||||
opts->unshared_obb = true;
|
||||
break;
|
||||
/* unknown option */
|
||||
default:
|
||||
if (!silent)
|
||||
|
@ -181,12 +186,15 @@ int parse_options_remount(struct super_block *sb, char *options, int silent,
|
|||
return 0;
|
||||
vfsopts->mask = option;
|
||||
break;
|
||||
case Opt_unshared_obb:
|
||||
case Opt_default_normal:
|
||||
case Opt_multiuser:
|
||||
case Opt_userid:
|
||||
case Opt_fsuid:
|
||||
case Opt_fsgid:
|
||||
case Opt_reserved_mb:
|
||||
case Opt_gid_derivation:
|
||||
if (!silent)
|
||||
pr_warn("Option \"%s\" can't be changed during remount\n", p);
|
||||
break;
|
||||
/* unknown option */
|
||||
|
|
|
@ -219,6 +219,7 @@ struct sdcardfs_mount_options {
|
|||
userid_t fs_user_id;
|
||||
bool multiuser;
|
||||
bool gid_derivation;
|
||||
bool unshared_obb;
|
||||
unsigned int reserved_mb;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue