public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: netdev@vger.kernel.org
Cc: David Howells <dhowells@redhat.com>,
	Marc Dionne <marc.dionne@auristor.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Christian Brauner <brauner@kernel.org>,
	linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org,
	Simon Horman <horms@kernel.org>
Subject: [PATCH net-next 06/15] afs: Remove the "autocell" mount option
Date: Mon, 24 Feb 2025 23:41:43 +0000	[thread overview]
Message-ID: <20250224234154.2014840-7-dhowells@redhat.com> (raw)
In-Reply-To: <20250224234154.2014840-1-dhowells@redhat.com>

Remove the "autocell" mount option.  It was an attempt to do automounting
of arbitrary cells based on what the user looked up but within the root
directory of a mounted volume.  This isn't really the right thing to do,
and using the "dyn" mount option to get the dynamic root is the right way
to do it.  The kafs-client package uses "-o dyn" when mounting /afs, so it
should be safe to drop "-o autocell".

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: "David S. Miller" <davem@davemloft.net>
cc: Eric Dumazet <edumazet@google.com>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: netdev@vger.kernel.org
---
 fs/afs/dir.c      | 5 ++---
 fs/afs/dynroot.c  | 5 +----
 fs/afs/internal.h | 2 --
 fs/afs/super.c    | 5 -----
 4 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index 02cbf38e1a77..9f62b8938350 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -1004,9 +1004,8 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
 	afs_stat_v(dvnode, n_lookup);
 	inode = afs_do_lookup(dir, dentry);
 	if (inode == ERR_PTR(-ENOENT))
-		inode = afs_try_auto_mntpt(dentry, dir);
-
-	if (!IS_ERR_OR_NULL(inode))
+		inode = NULL;
+	else if (!IS_ERR_OR_NULL(inode))
 		fid = AFS_FS_I(inode)->fid;
 
 	_debug("splice %p", dentry->d_inode);
diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c
index d8bf52f77d93..bdc86dedd964 100644
--- a/fs/afs/dynroot.c
+++ b/fs/afs/dynroot.c
@@ -155,7 +155,7 @@ static int afs_probe_cell_name(struct dentry *dentry)
  * Try to auto mount the mountpoint with pseudo directory, if the autocell
  * operation is setted.
  */
-struct inode *afs_try_auto_mntpt(struct dentry *dentry, struct inode *dir)
+static struct inode *afs_try_auto_mntpt(struct dentry *dentry, struct inode *dir)
 {
 	struct afs_vnode *vnode = AFS_FS_I(dir);
 	struct inode *inode;
@@ -164,9 +164,6 @@ struct inode *afs_try_auto_mntpt(struct dentry *dentry, struct inode *dir)
 	_enter("%p{%pd}, {%llx:%llu}",
 	       dentry, dentry, vnode->fid.vid, vnode->fid.vnode);
 
-	if (!test_bit(AFS_VNODE_AUTOCELL, &vnode->flags))
-		goto out;
-
 	ret = afs_probe_cell_name(dentry);
 	if (ret < 0)
 		goto out;
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 90f407774a9a..be9d5b9cc7f6 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -700,7 +700,6 @@ struct afs_vnode {
 #define AFS_VNODE_ZAP_DATA	3		/* set if vnode's data should be invalidated */
 #define AFS_VNODE_DELETED	4		/* set if vnode deleted on server */
 #define AFS_VNODE_MOUNTPOINT	5		/* set if vnode is a mountpoint symlink */
-#define AFS_VNODE_AUTOCELL	6		/* set if Vnode is an auto mount point */
 #define AFS_VNODE_PSEUDODIR	7 		/* set if Vnode is a pseudo directory */
 #define AFS_VNODE_NEW_CONTENT	8		/* Set if file has new content (create/trunc-0) */
 #define AFS_VNODE_SILLY_DELETED	9		/* Set if file has been silly-deleted */
@@ -1111,7 +1110,6 @@ extern int afs_silly_iput(struct dentry *, struct inode *);
 extern const struct inode_operations afs_dynroot_inode_operations;
 extern const struct dentry_operations afs_dynroot_dentry_operations;
 
-extern struct inode *afs_try_auto_mntpt(struct dentry *, struct inode *);
 extern int afs_dynroot_mkdir(struct afs_net *, struct afs_cell *);
 extern void afs_dynroot_rmdir(struct afs_net *, struct afs_cell *);
 extern int afs_dynroot_populate(struct super_block *);
diff --git a/fs/afs/super.c b/fs/afs/super.c
index a9bee610674e..2f18aa8e2806 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -194,8 +194,6 @@ static int afs_show_options(struct seq_file *m, struct dentry *root)
 
 	if (as->dyn_root)
 		seq_puts(m, ",dyn");
-	if (test_bit(AFS_VNODE_AUTOCELL, &AFS_FS_I(d_inode(root))->flags))
-		seq_puts(m, ",autocell");
 	switch (as->flock_mode) {
 	case afs_flock_mode_unset:	break;
 	case afs_flock_mode_local:	p = "local";	break;
@@ -478,9 +476,6 @@ static int afs_fill_super(struct super_block *sb, struct afs_fs_context *ctx)
 	if (IS_ERR(inode))
 		return PTR_ERR(inode);
 
-	if (ctx->autocell || as->dyn_root)
-		set_bit(AFS_VNODE_AUTOCELL, &AFS_FS_I(inode)->flags);
-
 	ret = -ENOMEM;
 	sb->s_root = d_make_root(inode);
 	if (!sb->s_root)


  parent reply	other threads:[~2025-02-24 23:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 23:41 [PATCH net-next 00/15] afs, rxrpc: Clean up refcounting on afs_cell and afs_server records David Howells
2025-02-24 23:41 ` [PATCH net-next 01/15] rxrpc: rxperf: Fix missing decoding of terminal magic cookie David Howells
2025-02-24 23:41 ` [PATCH net-next 02/15] rxrpc: peer->mtu_lock is redundant David Howells
2025-02-24 23:41 ` [PATCH net-next 03/15] rxrpc: Fix locking issues with the peer record hash David Howells
2025-02-24 23:41 ` [PATCH net-next 04/15] afs: Fix the server_list to unuse a displaced server rather than putting it David Howells
2025-02-24 23:41 ` [PATCH net-next 05/15] afs: Give an afs_server object a ref on the afs_cell object it points to David Howells
2025-02-24 23:41 ` David Howells [this message]
2025-02-24 23:41 ` [PATCH net-next 07/15] afs: Change dynroot to create contents on demand David Howells
2025-02-24 23:41 ` [PATCH net-next 08/15] afs: Improve afs_volume tracing to display a debug ID David Howells
2025-02-24 23:41 ` [PATCH net-next 09/15] afs: Improve server refcount/active count tracing David Howells
2025-02-24 23:41 ` [PATCH net-next 10/15] afs: Make afs_lookup_cell() take a trace note David Howells
2025-02-24 23:41 ` [PATCH net-next 11/15] afs: Drop the net parameter from afs_unuse_cell() David Howells
2025-02-24 23:41 ` [PATCH net-next 12/15] rxrpc: Allow the app to store private data on peer structs David Howells
2025-02-24 23:41 ` [PATCH net-next 13/15] afs: Use the per-peer app data provided by rxrpc David Howells
2025-02-24 23:41 ` [PATCH net-next 14/15] afs: Fix afs_server ref accounting David Howells
2025-02-24 23:41 ` [PATCH net-next 15/15] afs: Simplify cell record handling David Howells
2025-02-27 11:27 ` [PATCH net-next 00/15] afs, rxrpc: Clean up refcounting on afs_cell and afs_server records Paolo Abeni
2025-02-27 13:10   ` David Howells
2025-02-27 14:43     ` Paolo Abeni
2025-02-27 15:36       ` Which tree to push afs + crypto + rxrpc spanning patches through? David Howells
2025-02-28  8:08         ` Herbert Xu
2025-02-27 19:20 ` [PATCH net-next 00/15] afs, rxrpc: Clean up refcounting on afs_cell and afs_server records patchwork-bot+netdevbpf
2025-02-28  0:49   ` Jakub Kicinski
2025-02-28  6:52     ` David Howells

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=20250224234154.2014840-7-dhowells@redhat.com \
    --to=dhowells@redhat.com \
    --cc=brauner@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.dionne@auristor.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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