linux/fs/9p/vfs_inode_dotl.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * This file contains vfs inode ops for the 9P2000.L protocol.
 *
 *  Copyright (C) 2004 by Eric Van Hensbergen <[email protected]>
 *  Copyright (C) 2002 by Ron Minnich <[email protected]>
 */

#include <linux/module.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/pagemap.h>
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/namei.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/xattr.h>
#include <linux/posix_acl.h>
#include <net/9p/9p.h>
#include <net/9p/client.h>

#include "v9fs.h"
#include "v9fs_vfs.h"
#include "fid.h"
#include "cache.h"
#include "xattr.h"
#include "acl.h"

static int
v9fs_vfs_mknod_dotl(struct mnt_idmap *idmap, struct inode *dir,
		    struct dentry *dentry, umode_t omode, dev_t rdev);

/**
 * v9fs_get_fsgid_for_create - Helper function to get the gid for a new object
 * @dir_inode: The directory inode
 *
 * Helper function to get the gid for creating a
 * new file system object. This checks the S_ISGID to determine the owning
 * group of the new file system object.
 */

static kgid_t v9fs_get_fsgid_for_create(struct inode *dir_inode)
{}



struct inode *
v9fs_fid_iget_dotl(struct super_block *sb, struct p9_fid *fid, bool new)
{}

struct dotl_openflag_map {};

static int v9fs_mapped_dotl_flags(int flags)
{}

/**
 * v9fs_open_to_dotl_flags- convert Linux specific open flags to
 * plan 9 open flag.
 * @flags: flags to convert
 */
int v9fs_open_to_dotl_flags(int flags)
{}

/**
 * v9fs_vfs_create_dotl - VFS hook to create files for 9P2000.L protocol.
 * @idmap: The user namespace of the mount
 * @dir: directory inode that is being created
 * @dentry:  dentry that is being deleted
 * @omode: create permissions
 * @excl: True if the file must not yet exist
 *
 */
static int
v9fs_vfs_create_dotl(struct mnt_idmap *idmap, struct inode *dir,
		     struct dentry *dentry, umode_t omode, bool excl)
{}

static int
v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
			  struct file *file, unsigned int flags, umode_t omode)
{}

/**
 * v9fs_vfs_mkdir_dotl - VFS mkdir hook to create a directory
 * @idmap: The idmap of the mount
 * @dir:  inode that is being unlinked
 * @dentry: dentry that is being unlinked
 * @omode: mode for new directory
 *
 */

static int v9fs_vfs_mkdir_dotl(struct mnt_idmap *idmap,
			       struct inode *dir, struct dentry *dentry,
			       umode_t omode)
{}

static int
v9fs_vfs_getattr_dotl(struct mnt_idmap *idmap,
		      const struct path *path, struct kstat *stat,
		      u32 request_mask, unsigned int flags)
{}

/*
 * Attribute flags.
 */
#define P9_ATTR_MODE
#define P9_ATTR_UID
#define P9_ATTR_GID
#define P9_ATTR_SIZE
#define P9_ATTR_ATIME
#define P9_ATTR_MTIME
#define P9_ATTR_CTIME
#define P9_ATTR_ATIME_SET
#define P9_ATTR_MTIME_SET

struct dotl_iattr_map {};

static int v9fs_mapped_iattr_valid(int iattr_valid)
{}

/**
 * v9fs_vfs_setattr_dotl - set file metadata
 * @idmap: idmap of the mount
 * @dentry: file whose metadata to set
 * @iattr: metadata assignment structure
 *
 */

int v9fs_vfs_setattr_dotl(struct mnt_idmap *idmap,
			  struct dentry *dentry, struct iattr *iattr)
{}

/**
 * v9fs_stat2inode_dotl - populate an inode structure with stat info
 * @stat: stat structure
 * @inode: inode to populate
 * @flags: ctrl flags (e.g. V9FS_STAT2INODE_KEEP_ISIZE)
 *
 */

void
v9fs_stat2inode_dotl(struct p9_stat_dotl *stat, struct inode *inode,
		      unsigned int flags)
{}

static int
v9fs_vfs_symlink_dotl(struct mnt_idmap *idmap, struct inode *dir,
		      struct dentry *dentry, const char *symname)
{}

/**
 * v9fs_vfs_link_dotl - create a hardlink for dotl
 * @old_dentry: dentry for file to link to
 * @dir: inode destination for new link
 * @dentry: dentry for link
 *
 */

static int
v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir,
		struct dentry *dentry)
{}

/**
 * v9fs_vfs_mknod_dotl - create a special file
 * @idmap: The idmap of the mount
 * @dir: inode destination for new link
 * @dentry: dentry for file
 * @omode: mode for creation
 * @rdev: device associated with special file
 *
 */
static int
v9fs_vfs_mknod_dotl(struct mnt_idmap *idmap, struct inode *dir,
		    struct dentry *dentry, umode_t omode, dev_t rdev)
{}

/**
 * v9fs_vfs_get_link_dotl - follow a symlink path
 * @dentry: dentry for symlink
 * @inode: inode for symlink
 * @done: destructor for return value
 */

static const char *
v9fs_vfs_get_link_dotl(struct dentry *dentry,
		       struct inode *inode,
		       struct delayed_call *done)
{}

int v9fs_refresh_inode_dotl(struct p9_fid *fid, struct inode *inode)
{}

const struct inode_operations v9fs_dir_inode_operations_dotl =;

const struct inode_operations v9fs_file_inode_operations_dotl =;

const struct inode_operations v9fs_symlink_inode_operations_dotl =;