diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 905e9d7e3305..1d580d39c52a 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -146,6 +146,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_f2fs_down_read); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_f2fs_improve_priority); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_f2fs_restore_priority); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_f2fs_printk); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_f2fs_create); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_io_statistics); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cgroup_attach); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_iommu_setup_dma_ops); diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 3d85d8116dae..48622fb0c4a1 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -22,6 +22,9 @@ #include "acl.h" #include +#undef CREATE_TRACE_POINTS +#include + static inline bool is_extension_exist(const unsigned char *s, const char *sub, bool tmp_ext, bool tmp_dot) { @@ -376,6 +379,7 @@ static int f2fs_create(struct mnt_idmap *idmap, struct inode *dir, inode->i_mapping->a_ops = &f2fs_dblock_aops; ino = inode->i_ino; + trace_android_vh_f2fs_create(inode, dentry); f2fs_lock_op(sbi); err = f2fs_add_link(dentry, inode); if (err) diff --git a/include/trace/hooks/fs.h b/include/trace/hooks/fs.h index f5498f044b4f..a313ee21339f 100644 --- a/include/trace/hooks/fs.h +++ b/include/trace/hooks/fs.h @@ -27,6 +27,10 @@ DECLARE_HOOK(android_vh_f2fs_printk, TP_PROTO(struct f2fs_sb_info *sbi, struct va_format *vaf, int level, bool limit_rate), TP_ARGS(sbi, vaf, level, limit_rate)); +DECLARE_HOOK(android_vh_f2fs_create, + TP_PROTO(struct inode *inode, struct dentry *dentry), + TP_ARGS(inode, dentry)); + DECLARE_HOOK(android_vh_wb_dirty_limits, TP_PROTO(unsigned long *thresh, struct bdi_writeback *wb), TP_ARGS(thresh, wb));