// SPDX-License-Identifier: GPL-2.0-or-later /* mountpoint management * * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com)
*/
/* * no valid lookup procedure on this sort of dir
*/ staticstruct dentry *afs_mntpt_lookup(struct inode *dir, struct dentry *dentry, unsignedint flags)
{
_enter("%p,%p{%pd2}", dir, dentry, dentry); return ERR_PTR(-EREMOTE);
}
/* * no valid open procedure on this sort of dir
*/ staticint afs_mntpt_open(struct inode *inode, struct file *file)
{
_enter("%p,%p{%pD2}", inode, file, file); return -EREMOTE;
}
/* * Set the parameters for the proposed superblock.
*/ staticint afs_mntpt_set_params(struct fs_context *fc, struct dentry *mntpt)
{ struct afs_fs_context *ctx = fc->fs_private; struct afs_super_info *src_as = AFS_FS_S(mntpt->d_sb); struct afs_vnode *vnode = AFS_FS_I(d_inode(mntpt)); struct afs_cell *cell; constchar *p; int ret;
if (fc->net_ns != src_as->net_ns) {
put_net(fc->net_ns);
fc->net_ns = get_net(src_as->net_ns);
}
if (src_as->volume && src_as->volume->type == AFSVL_RWVOL) {
ctx->type = AFSVL_RWVOL;
ctx->force = true;
} if (ctx->cell) {
afs_unuse_cell(ctx->cell, afs_cell_trace_unuse_mntpt);
ctx->cell = NULL;
} if (test_bit(AFS_VNODE_PSEUDODIR, &vnode->flags)) { /* if the directory is a pseudo directory, use the d_name */ unsigned size = mntpt->d_name.len;
if (size < 2) return -ENOENT;
p = mntpt->d_name.name; if (mntpt->d_name.name[0] == '.') {
size--;
p++;
ctx->type = AFSVL_RWVOL;
ctx->force = true;
} if (size > AFS_MAXCELLNAME) return -ENAMETOOLONG;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.