[-next] fs: mount_notify.c: fix build without CONFIG_FSINFO
diff mbox series

Message ID cb34df80-d6af-507d-9935-1685b787f7a3@infradead.org
State New
Headers show
Series
  • [-next] fs: mount_notify.c: fix build without CONFIG_FSINFO
Related show

Commit Message

Randy Dunlap Aug. 5, 2020, 1:11 p.m. UTC
From: Randy Dunlap <rdunlap@infradead.org>

Fix mount_notify.c build errors when CONFIG_FSINFO is not set/enabled:

../fs/mount_notify.c:94:28: error: 'struct mount' has no member named 'mnt_unique_id'; did you mean 'mnt_group_id'?
../fs/mount_notify.c:109:28: error: 'struct mount' has no member named 'mnt_unique_id'; did you mean 'mnt_group_id'?

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
---
 fs/mount_notify.c |    4 ++++
 1 file changed, 4 insertions(+)

Patch
diff mbox series

--- linux-next-20200805.orig/fs/mount_notify.c
+++ linux-next-20200805/fs/mount_notify.c
@@ -91,7 +91,9 @@  void notify_mount(struct mount *trigger,
 	n.watch.type	= WATCH_TYPE_MOUNT_NOTIFY;
 	n.watch.subtype	= subtype;
 	n.watch.info	= info_flags | watch_sizeof(n);
+#ifdef CONFIG_FSINFO
 	n.triggered_on	= trigger->mnt_unique_id;
+#endif
 
 	smp_wmb(); /* See fsinfo_generic_mount_info(). */
 
@@ -106,7 +108,9 @@  void notify_mount(struct mount *trigger,
 	case NOTIFY_MOUNT_UNMOUNT:
 	case NOTIFY_MOUNT_MOVE_FROM:
 	case NOTIFY_MOUNT_MOVE_TO:
+#ifdef CONFIG_FSINFO
 		n.auxiliary_mount = aux->mnt_unique_id;
+#endif
 		atomic_long_inc(&trigger->mnt_topology_changes);
 		atomic_long_inc(&aux->mnt_topology_changes);
 		break;