]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
afs: Remove the "autocell" mount option
authorDavid Howells <dhowells@redhat.com>
Mon, 24 Feb 2025 10:22:47 +0000 (10:22 +0000)
committerDavid Howells <dhowells@redhat.com>
Mon, 10 Mar 2025 09:47:05 +0000 (09:47 +0000)
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: linux-afs@lists.infradead.org
cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20250224234154.2014840-7-dhowells@redhat.com/
Link: https://lore.kernel.org/r/20250310094206.801057-3-dhowells@redhat.com/
fs/afs/dir.c
fs/afs/dynroot.c
fs/afs/internal.h
fs/afs/super.c

index 02cbf38e1a7762b95a97a31e4dcd1d8335c2df75..9f62b8938350c2db9551b7ca8d9ba7b3c24daf66 100644 (file)
@@ -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);
index 008698d706caa4879074a150d3ae82b7cc3245a2..0b4cc291c65e2dc3a1bff723026866de178d9ba8 100644 (file)
@@ -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;
index df30bd62da79ea31ffd3430269fe1fdc9a8abbac..0e00e061f0d914cf0e142a3efb409ba59b0510bf 100644 (file)
@@ -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 *);
index a9bee610674e5ada0b5d12a9449d6b382bca6cac..2f18aa8e2806c2ce91c3dd22172554ebe75a10a5 100644 (file)
@@ -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)