Re: [PATCH -next] fs: mount_notify.c: fix build without CONFIG_FSINFO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Randy,

> From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxx>
> Cc: David Howells <dhowells@xxxxxxxxxx>
> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
> Cc: linux-fsdevel@xxxxxxxxxxxxxxx

That's not quite the right solution.  I'm going to use the attached instead.

David
---
commit 830d864747b00d979914f15adaad58ccb9fd77f6
Author: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Date:   Wed Aug 5 06:11:32 2020 -0700

    fs: mount_notify.c: fix build without CONFIG_FSINFO
    
    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'?
    
    [DH: Fix this to use mnt_id if CONFIG_FSINFO=n rather than not setting
    anything]
    
    Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
    Cc: David Howells <dhowells@xxxxxxxxxx>
    Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
    Cc: linux-fsdevel@xxxxxxxxxxxxxxx
    Signed-off-by: David Howells <dhowells@xxxxxxxxxx>

diff --git a/fs/mount_notify.c b/fs/mount_notify.c
index 57995c27ca88..254090b6d5ac 100644
--- a/fs/mount_notify.c
+++ b/fs/mount_notify.c
@@ -91,7 +91,11 @@ 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;
+#else
+	n.triggered_on	= trigger->mnt_id;
+#endif
 
 	smp_wmb(); /* See fsinfo_generic_mount_info(). */
 
@@ -106,7 +110,11 @@ 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;
+#else
+		n.auxiliary_mount = aux->mnt_id;
+#endif
 		atomic_long_inc(&trigger->mnt_topology_changes);
 		atomic_long_inc(&aux->mnt_topology_changes);
 		break;





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux