Skip to content

Commit 4c5ad63

Browse files
committed
afs: Remove the "autocell" mount option
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/ # v1 Link: https://lore.kernel.org/r/20250310094206.801057-3-dhowells@redhat.com/ # v4
1 parent 823869e commit 4c5ad63

4 files changed

Lines changed: 3 additions & 14 deletions

File tree

fs/afs/dir.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,9 +1004,8 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
10041004
afs_stat_v(dvnode, n_lookup);
10051005
inode = afs_do_lookup(dir, dentry);
10061006
if (inode == ERR_PTR(-ENOENT))
1007-
inode = afs_try_auto_mntpt(dentry, dir);
1008-
1009-
if (!IS_ERR_OR_NULL(inode))
1007+
inode = NULL;
1008+
else if (!IS_ERR_OR_NULL(inode))
10101009
fid = AFS_FS_I(inode)->fid;
10111010

10121011
_debug("splice %p", dentry->d_inode);

fs/afs/dynroot.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static int afs_probe_cell_name(struct dentry *dentry)
155155
* Try to auto mount the mountpoint with pseudo directory, if the autocell
156156
* operation is setted.
157157
*/
158-
struct inode *afs_try_auto_mntpt(struct dentry *dentry, struct inode *dir)
158+
static struct inode *afs_try_auto_mntpt(struct dentry *dentry, struct inode *dir)
159159
{
160160
struct afs_vnode *vnode = AFS_FS_I(dir);
161161
struct inode *inode;
@@ -164,9 +164,6 @@ struct inode *afs_try_auto_mntpt(struct dentry *dentry, struct inode *dir)
164164
_enter("%p{%pd}, {%llx:%llu}",
165165
dentry, dentry, vnode->fid.vid, vnode->fid.vnode);
166166

167-
if (!test_bit(AFS_VNODE_AUTOCELL, &vnode->flags))
168-
goto out;
169-
170167
ret = afs_probe_cell_name(dentry);
171168
if (ret < 0)
172169
goto out;

fs/afs/internal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,6 @@ struct afs_vnode {
700700
#define AFS_VNODE_ZAP_DATA 3 /* set if vnode's data should be invalidated */
701701
#define AFS_VNODE_DELETED 4 /* set if vnode deleted on server */
702702
#define AFS_VNODE_MOUNTPOINT 5 /* set if vnode is a mountpoint symlink */
703-
#define AFS_VNODE_AUTOCELL 6 /* set if Vnode is an auto mount point */
704703
#define AFS_VNODE_PSEUDODIR 7 /* set if Vnode is a pseudo directory */
705704
#define AFS_VNODE_NEW_CONTENT 8 /* Set if file has new content (create/trunc-0) */
706705
#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 *);
11111110
extern const struct inode_operations afs_dynroot_inode_operations;
11121111
extern const struct dentry_operations afs_dynroot_dentry_operations;
11131112

1114-
extern struct inode *afs_try_auto_mntpt(struct dentry *, struct inode *);
11151113
extern int afs_dynroot_mkdir(struct afs_net *, struct afs_cell *);
11161114
extern void afs_dynroot_rmdir(struct afs_net *, struct afs_cell *);
11171115
extern int afs_dynroot_populate(struct super_block *);

fs/afs/super.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ static int afs_show_options(struct seq_file *m, struct dentry *root)
194194

195195
if (as->dyn_root)
196196
seq_puts(m, ",dyn");
197-
if (test_bit(AFS_VNODE_AUTOCELL, &AFS_FS_I(d_inode(root))->flags))
198-
seq_puts(m, ",autocell");
199197
switch (as->flock_mode) {
200198
case afs_flock_mode_unset: break;
201199
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)
478476
if (IS_ERR(inode))
479477
return PTR_ERR(inode);
480478

481-
if (ctx->autocell || as->dyn_root)
482-
set_bit(AFS_VNODE_AUTOCELL, &AFS_FS_I(inode)->flags);
483-
484479
ret = -ENOMEM;
485480
sb->s_root = d_make_root(inode);
486481
if (!sb->s_root)

0 commit comments

Comments
 (0)