Revert "ANDROID: mnt: Add filesystem private data to mount points"
This reverts commit 8e31748d2c
(change Ie769d7b3bb2f5972afe05c1bf16cf88c91647ab2).
This is no longer needed because the only user of vfsmount::data was
sdcardfs, and sdcardfs has now been removed.
Bug: 157700134
Change-Id: I1af6d917288e80b8fec5abcb27bd896078cecf30
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
87b919b2a2
commit
fe0d068d7c
@@ -198,7 +198,6 @@ static struct mount *alloc_vfsmnt(const char *name)
|
||||
mnt->mnt_count = 1;
|
||||
mnt->mnt_writers = 0;
|
||||
#endif
|
||||
mnt->mnt.data = NULL;
|
||||
|
||||
INIT_HLIST_NODE(&mnt->mnt_hash);
|
||||
INIT_LIST_HEAD(&mnt->mnt_child);
|
||||
@@ -548,7 +547,6 @@ int sb_prepare_remount_readonly(struct super_block *sb)
|
||||
|
||||
static void free_vfsmnt(struct mount *mnt)
|
||||
{
|
||||
kfree(mnt->mnt.data);
|
||||
kfree_const(mnt->mnt_devname);
|
||||
#ifdef CONFIG_SMP
|
||||
free_percpu(mnt->mnt_pcp);
|
||||
@@ -959,15 +957,6 @@ struct vfsmount *vfs_create_mount(struct fs_context *fc)
|
||||
if (!mnt)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
if (fc->fs_type->alloc_mnt_data) {
|
||||
mnt->mnt.data = fc->fs_type->alloc_mnt_data();
|
||||
if (!mnt->mnt.data) {
|
||||
mnt_free_id(mnt);
|
||||
free_vfsmnt(mnt);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
fc->root->d_sb->s_op->update_mnt_data(mnt->mnt.data, fc);
|
||||
}
|
||||
if (fc->sb_flags & SB_KERNMOUNT)
|
||||
mnt->mnt.mnt_flags = MNT_INTERNAL;
|
||||
|
||||
@@ -1051,14 +1040,6 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root,
|
||||
if (!mnt)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
if (sb->s_op->clone_mnt_data) {
|
||||
mnt->mnt.data = sb->s_op->clone_mnt_data(old->mnt.data);
|
||||
if (!mnt->mnt.data) {
|
||||
err = -ENOMEM;
|
||||
goto out_free;
|
||||
}
|
||||
}
|
||||
|
||||
if (flag & (CL_SLAVE | CL_PRIVATE | CL_SHARED_TO_SLAVE))
|
||||
mnt->mnt_group_id = 0; /* not a peer of original */
|
||||
else
|
||||
@@ -2629,15 +2610,8 @@ static int do_remount(struct path *path, int ms_flags, int sb_flags,
|
||||
err = -EPERM;
|
||||
if (ns_capable(sb->s_user_ns, CAP_SYS_ADMIN)) {
|
||||
err = reconfigure_super(fc);
|
||||
if (!err) {
|
||||
sb->s_op->update_mnt_data(mnt->mnt.data, fc);
|
||||
if (!err)
|
||||
set_mount_attributes(mnt, mnt_flags);
|
||||
namespace_lock();
|
||||
lock_mount_hash();
|
||||
propagate_remount(mnt);
|
||||
unlock_mount_hash();
|
||||
namespace_unlock();
|
||||
}
|
||||
}
|
||||
up_write(&sb->s_umount);
|
||||
}
|
||||
|
||||
16
fs/pnode.c
16
fs/pnode.c
@@ -600,19 +600,3 @@ int propagate_umount(struct list_head *list)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void propagate_remount(struct mount *mnt)
|
||||
{
|
||||
struct mount *parent = mnt->mnt_parent;
|
||||
struct mount *p = mnt, *m;
|
||||
struct super_block *sb = mnt->mnt.mnt_sb;
|
||||
|
||||
if (!sb->s_op->copy_mnt_data)
|
||||
return;
|
||||
for (p = propagation_next(parent, parent); p;
|
||||
p = propagation_next(p, parent)) {
|
||||
m = __lookup_mnt(&p->mnt, mnt->mnt_mountpoint);
|
||||
if (m)
|
||||
sb->s_op->copy_mnt_data(m->mnt.data, mnt->mnt.data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ int propagate_mnt(struct mount *, struct mountpoint *, struct mount *,
|
||||
int propagate_umount(struct list_head *);
|
||||
int propagate_mount_busy(struct mount *, int);
|
||||
void propagate_mount_unlock(struct mount *);
|
||||
void propagate_remount(struct mount *);
|
||||
void mnt_release_group_id(struct mount *);
|
||||
int get_dominating_id(struct mount *mnt, const struct path *root);
|
||||
unsigned int mnt_get_count(struct mount *mnt);
|
||||
|
||||
@@ -1931,9 +1931,6 @@ struct super_operations {
|
||||
int (*unfreeze_fs) (struct super_block *);
|
||||
int (*statfs) (struct dentry *, struct kstatfs *);
|
||||
int (*remount_fs) (struct super_block *, int *, char *);
|
||||
void *(*clone_mnt_data) (void *);
|
||||
void (*copy_mnt_data) (void *, void *);
|
||||
void (*update_mnt_data) (void *, struct fs_context *);
|
||||
void (*umount_begin) (struct super_block *);
|
||||
|
||||
int (*show_options)(struct seq_file *, struct dentry *);
|
||||
@@ -2220,7 +2217,6 @@ struct file_system_type {
|
||||
const struct fs_parameter_spec *parameters;
|
||||
struct dentry *(*mount) (struct file_system_type *, int,
|
||||
const char *, void *);
|
||||
void *(*alloc_mnt_data) (void);
|
||||
void (*kill_sb) (struct super_block *);
|
||||
struct module *owner;
|
||||
struct file_system_type * next;
|
||||
|
||||
@@ -71,7 +71,6 @@ struct vfsmount {
|
||||
struct dentry *mnt_root; /* root of the mounted tree */
|
||||
struct super_block *mnt_sb; /* pointer to superblock */
|
||||
int mnt_flags;
|
||||
void *data;
|
||||
} __randomize_layout;
|
||||
|
||||
struct file; /* forward dec */
|
||||
|
||||
Reference in New Issue
Block a user