Merge branch 'android12-5.10' into android12-5.10-lts
Sync up with android12-5.10 for the following commits:b9b8fd203d
UPSTREAM: lib/iov_iter: initialize "flags" in new pipe_buffer5db3e72c57
Revert "ANDROID: incremental-fs: remove index and incomplete dir on umount"07630c8073
Revert "ANDROID: incremental-fs: fix mount_fs issue"e4d293dc33
Revert "ANDROID: vendor_hooks: Add hooks for binder proc transaction" Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I3bf1e66d9b2cd14bcabf5cba16be6e8a55b4aac3
This commit is contained in:
@@ -2535,8 +2535,7 @@ static int binder_proc_transaction(struct binder_transaction *t,
|
|||||||
|
|
||||||
trace_android_vh_binder_proc_transaction_end(current, proc->tsk,
|
trace_android_vh_binder_proc_transaction_end(current, proc->tsk,
|
||||||
thread ? thread->task : NULL, t->code, pending_async, !oneway);
|
thread ? thread->task : NULL, t->code, pending_async, !oneway);
|
||||||
trace_android_vh_binder_proc_transaction_finish(proc, t,
|
|
||||||
thread ? thread->task : NULL, pending_async, !oneway);
|
|
||||||
if (!pending_async)
|
if (!pending_async)
|
||||||
binder_wakeup_thread_ilocked(proc, thread, !oneway /* sync */);
|
binder_wakeup_thread_ilocked(proc, thread, !oneway /* sync */);
|
||||||
|
|
||||||
|
@@ -279,7 +279,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_binder_transaction);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_preset);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_preset);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_end);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_end);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_finish);
|
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_new_ref);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_new_ref);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_del_ref);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_del_ref);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_post_init_entity_util_avg);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_post_init_entity_util_avg);
|
||||||
|
@@ -175,6 +175,7 @@ void incfs_free_mount_info(struct mount_info *mi)
|
|||||||
kfree(mi->pseudo_file_xattr[i].data);
|
kfree(mi->pseudo_file_xattr[i].data);
|
||||||
kfree(mi->mi_per_uid_read_timeouts);
|
kfree(mi->mi_per_uid_read_timeouts);
|
||||||
incfs_free_sysfs_node(mi->mi_sysfs_node);
|
incfs_free_sysfs_node(mi->mi_sysfs_node);
|
||||||
|
kfree(mi->mi_options.sysfs_name);
|
||||||
kfree(mi);
|
kfree(mi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -393,7 +393,7 @@ static int iterate_incfs_dir(struct file *file, struct dir_context *ctx)
|
|||||||
struct mount_info *mi = get_mount_info(file_superblock(file));
|
struct mount_info *mi = get_mount_info(file_superblock(file));
|
||||||
bool root;
|
bool root;
|
||||||
|
|
||||||
if (!dir || !mi) {
|
if (!dir) {
|
||||||
error = -EBADF;
|
error = -EBADF;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -1336,9 +1336,6 @@ static int dir_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||||||
struct dentry *trap;
|
struct dentry *trap;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
if (!mi)
|
|
||||||
return -EBADF;
|
|
||||||
|
|
||||||
error = mutex_lock_interruptible(&mi->mi_dir_struct_mutex);
|
error = mutex_lock_interruptible(&mi->mi_dir_struct_mutex);
|
||||||
if (error)
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
@@ -1667,9 +1664,6 @@ static ssize_t incfs_getxattr(struct dentry *d, const char *name,
|
|||||||
size_t stored_size;
|
size_t stored_size;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!mi)
|
|
||||||
return -EBADF;
|
|
||||||
|
|
||||||
if (di && di->backing_path.dentry)
|
if (di && di->backing_path.dentry)
|
||||||
return vfs_getxattr(di->backing_path.dentry, name, value, size);
|
return vfs_getxattr(di->backing_path.dentry, name, value, size);
|
||||||
|
|
||||||
@@ -1704,9 +1698,6 @@ static ssize_t incfs_setxattr(struct dentry *d, const char *name,
|
|||||||
size_t *stored_size;
|
size_t *stored_size;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!mi)
|
|
||||||
return -EBADF;
|
|
||||||
|
|
||||||
if (di && di->backing_path.dentry)
|
if (di && di->backing_path.dentry)
|
||||||
return vfs_setxattr(di->backing_path.dentry, name, value, size,
|
return vfs_setxattr(di->backing_path.dentry, name, value, size,
|
||||||
flags);
|
flags);
|
||||||
@@ -1745,11 +1736,6 @@ static ssize_t incfs_listxattr(struct dentry *d, char *list, size_t size)
|
|||||||
return vfs_listxattr(di->backing_path.dentry, list, size);
|
return vfs_listxattr(di->backing_path.dentry, list, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int incfs_test_super(struct super_block *s, void *p)
|
|
||||||
{
|
|
||||||
return s->s_fs_info != NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct dentry *incfs_mount_fs(struct file_system_type *type, int flags,
|
struct dentry *incfs_mount_fs(struct file_system_type *type, int flags,
|
||||||
const char *dev_name, void *data)
|
const char *dev_name, void *data)
|
||||||
{
|
{
|
||||||
@@ -1760,8 +1746,7 @@ struct dentry *incfs_mount_fs(struct file_system_type *type, int flags,
|
|||||||
struct dentry *incomplete_dir = NULL;
|
struct dentry *incomplete_dir = NULL;
|
||||||
struct super_block *src_fs_sb = NULL;
|
struct super_block *src_fs_sb = NULL;
|
||||||
struct inode *root_inode = NULL;
|
struct inode *root_inode = NULL;
|
||||||
struct super_block *sb = sget(type, incfs_test_super, set_anon_super,
|
struct super_block *sb = sget(type, NULL, set_anon_super, flags, NULL);
|
||||||
flags, NULL);
|
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
if (IS_ERR(sb))
|
if (IS_ERR(sb))
|
||||||
@@ -1802,18 +1787,13 @@ struct dentry *incfs_mount_fs(struct file_system_type *type, int flags,
|
|||||||
src_fs_sb = backing_dir_path.dentry->d_sb;
|
src_fs_sb = backing_dir_path.dentry->d_sb;
|
||||||
sb->s_maxbytes = src_fs_sb->s_maxbytes;
|
sb->s_maxbytes = src_fs_sb->s_maxbytes;
|
||||||
|
|
||||||
if (!sb->s_fs_info) {
|
mi = incfs_alloc_mount_info(sb, &options, &backing_dir_path);
|
||||||
mi = incfs_alloc_mount_info(sb, &options, &backing_dir_path);
|
|
||||||
|
|
||||||
if (IS_ERR_OR_NULL(mi)) {
|
if (IS_ERR_OR_NULL(mi)) {
|
||||||
error = PTR_ERR(mi);
|
error = PTR_ERR(mi);
|
||||||
pr_err("incfs: Error allocating mount info. %d\n", error);
|
pr_err("incfs: Error allocating mount info. %d\n", error);
|
||||||
mi = NULL;
|
mi = NULL;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
|
||||||
sb->s_fs_info = mi;
|
|
||||||
} else {
|
|
||||||
mi = sb->s_fs_info;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
index_dir = open_or_create_special_dir(backing_dir_path.dentry,
|
index_dir = open_or_create_special_dir(backing_dir_path.dentry,
|
||||||
@@ -1838,28 +1818,26 @@ struct dentry *incfs_mount_fs(struct file_system_type *type, int flags,
|
|||||||
}
|
}
|
||||||
mi->mi_incomplete_dir = incomplete_dir;
|
mi->mi_incomplete_dir = incomplete_dir;
|
||||||
|
|
||||||
|
sb->s_fs_info = mi;
|
||||||
root_inode = fetch_regular_inode(sb, backing_dir_path.dentry);
|
root_inode = fetch_regular_inode(sb, backing_dir_path.dentry);
|
||||||
if (IS_ERR(root_inode)) {
|
if (IS_ERR(root_inode)) {
|
||||||
error = PTR_ERR(root_inode);
|
error = PTR_ERR(root_inode);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sb->s_root = d_make_root(root_inode);
|
||||||
if (!sb->s_root) {
|
if (!sb->s_root) {
|
||||||
sb->s_root = d_make_root(root_inode);
|
error = -ENOMEM;
|
||||||
if (!sb->s_root) {
|
goto err;
|
||||||
error = -ENOMEM;
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
error = incfs_init_dentry(sb->s_root, &backing_dir_path);
|
|
||||||
if (error)
|
|
||||||
goto err;
|
|
||||||
}
|
}
|
||||||
|
error = incfs_init_dentry(sb->s_root, &backing_dir_path);
|
||||||
|
if (error)
|
||||||
|
goto err;
|
||||||
|
|
||||||
mi->mi_backing_dir_path = backing_dir_path;
|
path_put(&backing_dir_path);
|
||||||
sb->s_flags |= SB_ACTIVE;
|
sb->s_flags |= SB_ACTIVE;
|
||||||
|
|
||||||
pr_debug("incfs: mount\n");
|
pr_debug("incfs: mount\n");
|
||||||
free_options(&options);
|
|
||||||
return dget(sb->s_root);
|
return dget(sb->s_root);
|
||||||
err:
|
err:
|
||||||
sb->s_fs_info = NULL;
|
sb->s_fs_info = NULL;
|
||||||
@@ -1876,9 +1854,6 @@ static int incfs_remount_fs(struct super_block *sb, int *flags, char *data)
|
|||||||
struct mount_info *mi = get_mount_info(sb);
|
struct mount_info *mi = get_mount_info(sb);
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
if (!mi)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
sync_filesystem(sb);
|
sync_filesystem(sb);
|
||||||
err = parse_options(&options, (char *)data);
|
err = parse_options(&options, (char *)data);
|
||||||
if (err)
|
if (err)
|
||||||
@@ -1904,24 +1879,16 @@ out:
|
|||||||
void incfs_kill_sb(struct super_block *sb)
|
void incfs_kill_sb(struct super_block *sb)
|
||||||
{
|
{
|
||||||
struct mount_info *mi = sb->s_fs_info;
|
struct mount_info *mi = sb->s_fs_info;
|
||||||
struct inode *dinode = d_inode(mi->mi_backing_dir_path.dentry);
|
|
||||||
|
|
||||||
pr_debug("incfs: unmount\n");
|
pr_debug("incfs: unmount\n");
|
||||||
vfs_rmdir(dinode, mi->mi_index_dir);
|
generic_shutdown_super(sb);
|
||||||
vfs_rmdir(dinode, mi->mi_incomplete_dir);
|
|
||||||
|
|
||||||
kill_anon_super(sb);
|
|
||||||
incfs_free_mount_info(mi);
|
incfs_free_mount_info(mi);
|
||||||
sb->s_fs_info = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int show_options(struct seq_file *m, struct dentry *root)
|
static int show_options(struct seq_file *m, struct dentry *root)
|
||||||
{
|
{
|
||||||
struct mount_info *mi = get_mount_info(root->d_sb);
|
struct mount_info *mi = get_mount_info(root->d_sb);
|
||||||
|
|
||||||
if (!mi)
|
|
||||||
return -EBADF;
|
|
||||||
|
|
||||||
seq_printf(m, ",read_timeout_ms=%u", mi->mi_options.read_timeout_ms);
|
seq_printf(m, ",read_timeout_ms=%u", mi->mi_options.read_timeout_ms);
|
||||||
seq_printf(m, ",readahead=%u", mi->mi_options.readahead_pages);
|
seq_printf(m, ",readahead=%u", mi->mi_options.readahead_pages);
|
||||||
if (mi->mi_options.read_log_pages != 0) {
|
if (mi->mi_options.read_log_pages != 0) {
|
||||||
|
@@ -19,6 +19,7 @@ static inline struct mount_info *get_mount_info(struct super_block *sb)
|
|||||||
{
|
{
|
||||||
struct mount_info *result = sb->s_fs_info;
|
struct mount_info *result = sb->s_fs_info;
|
||||||
|
|
||||||
|
WARN_ON(!result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -69,10 +69,6 @@ DECLARE_HOOK(android_vh_binder_proc_transaction_end,
|
|||||||
struct task_struct *binder_th_task, unsigned int code,
|
struct task_struct *binder_th_task, unsigned int code,
|
||||||
bool pending_async, bool sync),
|
bool pending_async, bool sync),
|
||||||
TP_ARGS(caller_task, binder_proc_task, binder_th_task, code, pending_async, sync));
|
TP_ARGS(caller_task, binder_proc_task, binder_th_task, code, pending_async, sync));
|
||||||
DECLARE_HOOK(android_vh_binder_proc_transaction_finish,
|
|
||||||
TP_PROTO(struct binder_proc *proc, struct binder_transaction *t,
|
|
||||||
struct task_struct *binder_th_task, bool pending_async, bool sync),
|
|
||||||
TP_ARGS(proc, t, binder_th_task, pending_async, sync));
|
|
||||||
DECLARE_HOOK(android_vh_binder_new_ref,
|
DECLARE_HOOK(android_vh_binder_new_ref,
|
||||||
TP_PROTO(struct task_struct *proc, uint32_t ref_desc, int node_debug_id),
|
TP_PROTO(struct task_struct *proc, uint32_t ref_desc, int node_debug_id),
|
||||||
TP_ARGS(proc, ref_desc, node_debug_id));
|
TP_ARGS(proc, ref_desc, node_debug_id));
|
||||||
@@ -102,7 +98,6 @@ DECLARE_HOOK(android_vh_binder_read_done,
|
|||||||
DECLARE_HOOK(android_vh_binder_has_work_ilocked,
|
DECLARE_HOOK(android_vh_binder_has_work_ilocked,
|
||||||
TP_PROTO(struct binder_thread *thread, bool do_proc_work, int *ret),
|
TP_PROTO(struct binder_thread *thread, bool do_proc_work, int *ret),
|
||||||
TP_ARGS(thread, do_proc_work, ret));
|
TP_ARGS(thread, do_proc_work, ret));
|
||||||
|
|
||||||
/* macro versions of hooks are no longer required */
|
/* macro versions of hooks are no longer required */
|
||||||
|
|
||||||
#endif /* _TRACE_HOOK_BINDER_H */
|
#endif /* _TRACE_HOOK_BINDER_H */
|
||||||
|
Reference in New Issue
Block a user