public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat•com>
To: Randy Dunlap <rdunlap@infradead•org>
Cc: dhowells@redhat•com,
	Linux FS Devel <linux-fsdevel@vger•kernel.org>,
	"linux-next@vger•kernel.org" <linux-next@vger•kernel.org>,
	Al Viro <viro@ZenIV•linux.org.uk>,
	Stephen Rothwell <sfr@canb•auug.org.au>
Subject: Re: [PATCH -next] fs: mount_notify.c: fix build without CONFIG_FSINFO
Date: Wed, 05 Aug 2020 14:59:44 +0100	[thread overview]
Message-ID: <2303939.1596635984@warthog.procyon.org.uk> (raw)
In-Reply-To: <cb34df80-d6af-507d-9935-1685b787f7a3@infradead.org>

Hi Randy,

> 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

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

David
---
commit 830d864747b00d979914f15adaad58ccb9fd77f6
Author: Randy Dunlap <rdunlap@infradead•org>
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@infradead•org>
    Cc: David Howells <dhowells@redhat•com>
    Cc: Alexander Viro <viro@zeniv•linux.org.uk>
    Cc: linux-fsdevel@vger•kernel.org
    Signed-off-by: David Howells <dhowells@redhat•com>

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;


      reply	other threads:[~2020-08-05 17:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05 13:11 [PATCH -next] fs: mount_notify.c: fix build without CONFIG_FSINFO Randy Dunlap
2020-08-05 13:59 ` David Howells [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2303939.1596635984@warthog.procyon.org.uk \
    --to=dhowells@redhat$(echo .)com \
    --cc=linux-fsdevel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=rdunlap@infradead$(echo .)org \
    --cc=sfr@canb$(echo .)auug.org.au \
    --cc=viro@ZenIV$(echo .)linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox