diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 8e8138b8b90e..c280f0865180 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -487,6 +487,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_throttle_direct_reclaim_bypass); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_update_uid_stats); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_append_total_power); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_bd_link_disk_holder); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_do_new_mount_fc); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_new_ref); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_del_ref); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_fsnotify_open); diff --git a/fs/namespace.c b/fs/namespace.c index 73da51ac5a03..67ef907cf1ba 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -36,6 +36,7 @@ #include "pnode.h" #include "internal.h" +#include /* Maximum number of mounts in a mount namespace */ static unsigned int sysctl_mount_max __read_mostly = 100000; @@ -3454,6 +3455,8 @@ static int do_new_mount_fc(struct fs_context *fc, struct path *mountpoint, unlock_mount(mp); if (error < 0) mntput(mnt); + else + trace_android_vh_do_new_mount_fc(mountpoint, mnt); return error; } diff --git a/include/trace/hooks/blk.h b/include/trace/hooks/blk.h index a1962181bd55..17f8ce4bf183 100644 --- a/include/trace/hooks/blk.h +++ b/include/trace/hooks/blk.h @@ -17,6 +17,13 @@ DECLARE_HOOK(android_vh_bd_link_disk_holder, TP_PROTO(struct block_device *bdev, struct gendisk *disk), TP_ARGS(bdev, disk)); +struct path; +struct vfsmount; + +DECLARE_HOOK(android_vh_do_new_mount_fc, + TP_PROTO(struct path *mountpoint, struct vfsmount *mnt), + TP_ARGS(mountpoint, mnt)); + struct blk_mq_hw_ctx; struct request_queue;