[Devel] [PATCH RH9 09/10] xfs: Introduce xfs_send_uevent()

Kirill Tkhai ktkhai at virtuozzo.com
Tue Jan 25 15:23:30 MSK 2022


Helper to hide kobject from arguments

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/xfs/xfs_error.c |    7 +++++++
 fs/xfs/xfs_error.h |    3 +++
 2 files changed, 10 insertions(+)

diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c
index ce3bc1b291a1..25550c5bbb5b 100644
--- a/fs/xfs/xfs_error.c
+++ b/fs/xfs/xfs_error.c
@@ -466,3 +466,10 @@ xfs_inode_verifier_error(
 	if (xfs_error_level >= XFS_ERRLEVEL_HIGH)
 		xfs_stack_trace();
 }
+
+void xfs_send_uevent(struct super_block *sb, enum fs_event_type event)
+{
+	struct xfs_mount *mp = XFS_M(sb);
+
+	fs_send_uevent(sb, &mp->m_kobj.kobject, event);
+}
diff --git a/fs/xfs/xfs_error.h b/fs/xfs/xfs_error.h
index 1717b7508356..c0c8bd60cd36 100644
--- a/fs/xfs/xfs_error.h
+++ b/fs/xfs/xfs_error.h
@@ -6,6 +6,8 @@
 #ifndef	__XFS_ERROR_H__
 #define	__XFS_ERROR_H__
 
+#include <linux/fs.h>
+
 struct xfs_mount;
 
 extern void xfs_error_report(const char *tag, int level, struct xfs_mount *mp,
@@ -24,6 +26,7 @@ extern void xfs_verifier_error(struct xfs_buf *bp, int error,
 extern void xfs_inode_verifier_error(struct xfs_inode *ip, int error,
 			const char *name, const void *buf, size_t bufsz,
 			xfs_failaddr_t failaddr);
+extern void xfs_send_uevent(struct super_block *sb, enum fs_event_type event);
 
 #define	XFS_ERROR_REPORT(e, lvl, mp)	\
 	xfs_error_report(e, lvl, mp, __FILE__, __LINE__, __return_address)




More information about the Devel mailing list