mirror of
https://github.com/torvalds/linux.git
synced 2026-10-24 16:55:02 +02:00
fs: port ->create() to pass const mnt_idmap
Convert to const struct mnt_idmap. A mount's idmapping is immutable. The only thing that is allowed to be modified afterwards is the reference count and that is hidden behind mnt_idmap_get() and mnt_idmap_put(). Everything else only ever reads from the idmapping. This is the same model that struct cred uses and the idmapping is also rather sensitive. So make the idmap argument const wherever we can. The conversion is done from the bottom up so callers can continue to pass a non-const pointer to a const parameter until the conversion is finished. No functional changes. Link: https://patch.msgid.link/20260901-work-idmap-const-v1-22-54ccd48e100b@kernel.org Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Seth Forshee <sforshee@kernel.org> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
6bd532e338
commit
eb50cbe14f
|
|
@ -61,7 +61,7 @@ inode_operations
|
|||
|
||||
prototypes::
|
||||
|
||||
int (*create) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t);
|
||||
int (*create) (const struct mnt_idmap *, struct inode *,struct dentry *,umode_t);
|
||||
struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
|
||||
int (*link) (struct dentry *,struct inode *,struct dentry *);
|
||||
int (*unlink) (struct inode *,struct dentry *);
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ As of kernel 2.6.22, the following members are defined:
|
|||
.. code-block:: c
|
||||
|
||||
struct inode_operations {
|
||||
int (*create) (struct mnt_idmap *, struct inode *,struct dentry *, umode_t);
|
||||
int (*create) (const struct mnt_idmap *, struct inode *,struct dentry *, umode_t);
|
||||
struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
|
||||
int (*link) (struct dentry *,struct inode *,struct dentry *);
|
||||
int (*unlink) (struct inode *,struct dentry *);
|
||||
|
|
|
|||
|
|
@ -652,7 +652,7 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,
|
|||
*/
|
||||
|
||||
static int
|
||||
v9fs_vfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
v9fs_vfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct v9fs_session_info *v9ses = v9fs_inode2v9ses(dir);
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ int v9fs_open_to_dotl_flags(int flags)
|
|||
*
|
||||
*/
|
||||
static int
|
||||
v9fs_vfs_create_dotl(struct mnt_idmap *idmap, struct inode *dir,
|
||||
v9fs_vfs_create_dotl(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t omode)
|
||||
{
|
||||
return v9fs_vfs_mknod_dotl(idmap, dir, dentry, omode, 0);
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ extern const struct export_operations affs_export_ops;
|
|||
extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len);
|
||||
extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int);
|
||||
extern int affs_unlink(struct inode *dir, struct dentry *dentry);
|
||||
extern int affs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
extern int affs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode);
|
||||
extern struct dentry *affs_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode);
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ affs_unlink(struct inode *dir, struct dentry *dentry)
|
|||
}
|
||||
|
||||
int
|
||||
affs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
affs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct super_block *sb = dir->i_sb;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ static bool afs_lookup_one_filldir(struct dir_context *ctx, const char *name, in
|
|||
static bool afs_lookup_filldir(struct dir_context *ctx, const char *name, int nlen,
|
||||
u64 ino, u32 uniquifier);
|
||||
#define AFS_LOOKUP ((filldir_t)0x137UL)
|
||||
static int afs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int afs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode);
|
||||
static struct dentry *afs_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode);
|
||||
|
|
@ -1632,7 +1632,7 @@ static const struct afs_operation_ops afs_create_operation = {
|
|||
/*
|
||||
* create a regular file on an AFS filesystem
|
||||
*/
|
||||
static int afs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int afs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct afs_operation *op;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ static const struct file_operations bad_file_ops =
|
|||
.open = bad_file_open,
|
||||
};
|
||||
|
||||
static int bad_inode_create(struct mnt_idmap *idmap,
|
||||
static int bad_inode_create(const struct mnt_idmap *idmap,
|
||||
struct inode *dir, struct dentry *dentry,
|
||||
umode_t mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ const struct file_operations bfs_dir_operations = {
|
|||
.llseek = generic_file_llseek,
|
||||
};
|
||||
|
||||
static int bfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int bfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
int err;
|
||||
|
|
|
|||
|
|
@ -7018,7 +7018,7 @@ static int btrfs_mknod(const struct mnt_idmap *idmap, struct inode *dir,
|
|||
return btrfs_create_common(dir, dentry, inode);
|
||||
}
|
||||
|
||||
static int btrfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int btrfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct inode *inode;
|
||||
|
|
|
|||
|
|
@ -988,7 +988,7 @@ static int ceph_mknod(const struct mnt_idmap *idmap, struct inode *dir,
|
|||
return err;
|
||||
}
|
||||
|
||||
static int ceph_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ceph_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
return ceph_mknod(idmap, dir, dentry, mode, 0);
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ static inline void coda_dir_drop_nlink(struct inode *dir)
|
|||
}
|
||||
|
||||
/* creation routines: create, mknod, mkdir, link, symlink */
|
||||
static int coda_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int coda_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *de, umode_t mode)
|
||||
{
|
||||
int error;
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry,
|
|||
* Returns zero on success; non-zero on error condition
|
||||
*/
|
||||
static int
|
||||
ecryptfs_create(struct mnt_idmap *idmap,
|
||||
ecryptfs_create(const struct mnt_idmap *idmap,
|
||||
struct inode *directory_inode, struct dentry *ecryptfs_dentry,
|
||||
umode_t mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ static bool efivarfs_valid_name(const char *str, int len)
|
|||
return uuid_is_valid(s);
|
||||
}
|
||||
|
||||
static int efivarfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int efivarfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct inode *inode = NULL;
|
||||
|
|
|
|||
|
|
@ -552,7 +552,7 @@ static int exfat_add_entry(struct inode *inode, const char *path,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int exfat_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int exfat_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct super_block *sb = dir->i_sb;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ struct dentry *ext2_get_parent(struct dentry *child)
|
|||
* If the create succeeds, we fill in the inode information
|
||||
* with d_instantiate().
|
||||
*/
|
||||
static int ext2_create (struct mnt_idmap * idmap,
|
||||
static int ext2_create (const struct mnt_idmap * idmap,
|
||||
struct inode * dir, struct dentry * dentry,
|
||||
umode_t mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2812,7 +2812,7 @@ static int ext4_add_nondir(handle_t *handle,
|
|||
* If the create succeeds, we fill in the inode information
|
||||
* with d_instantiate().
|
||||
*/
|
||||
static int ext4_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ext4_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
handle_t *handle;
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ static struct inode *f2fs_new_inode(const struct mnt_idmap *idmap,
|
|||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
static int f2fs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int f2fs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct f2fs_sb_info *sbi = F2FS_I_SB(dir);
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ static int msdos_add_entry(struct inode *dir, const unsigned char *name,
|
|||
}
|
||||
|
||||
/***** Create a file */
|
||||
static int msdos_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int msdos_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct super_block *sb = dir->i_sb;
|
||||
|
|
|
|||
|
|
@ -753,7 +753,7 @@ static struct dentry *vfat_lookup(struct inode *dir, struct dentry *dentry,
|
|||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
static int vfat_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int vfat_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct super_block *sb = dir->i_sb;
|
||||
|
|
|
|||
|
|
@ -1092,7 +1092,7 @@ static int fuse_mknod(const struct mnt_idmap *idmap, struct inode *dir,
|
|||
return create_new_nondir(idmap, fm, &args, dir, entry, mode);
|
||||
}
|
||||
|
||||
static int fuse_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int fuse_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *entry, umode_t mode)
|
||||
{
|
||||
return fuse_mknod(idmap, dir, entry, mode, 0);
|
||||
|
|
|
|||
|
|
@ -967,7 +967,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
|
|||
* Returns: errno
|
||||
*/
|
||||
|
||||
static int gfs2_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int gfs2_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
return gfs2_create_inode(dir, dentry, NULL, S_IFREG | mode, 0, NULL, 0, 1);
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ static int hfs_dir_release(struct inode *inode, struct file *file)
|
|||
* a directory and return a corresponding inode, given the inode for
|
||||
* the directory and the name (and its length) of the new file.
|
||||
*/
|
||||
static int hfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int hfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct inode *inode;
|
||||
|
|
|
|||
|
|
@ -561,7 +561,7 @@ static int hfsplus_mknod(const struct mnt_idmap *idmap, struct inode *dir,
|
|||
return res;
|
||||
}
|
||||
|
||||
static int hfsplus_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int hfsplus_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
return hfsplus_mknod(&nop_mnt_idmap, dir, dentry, mode, 0);
|
||||
|
|
|
|||
|
|
@ -592,7 +592,7 @@ static struct inode *hostfs_iget(struct super_block *sb, char *name)
|
|||
return inode;
|
||||
}
|
||||
|
||||
static int hostfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int hostfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct inode *inode;
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ static struct dentry *hpfs_mkdir(const struct mnt_idmap *idmap, struct inode *di
|
|||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
static int hpfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int hpfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
const unsigned char *name = dentry->d_name.name;
|
||||
|
|
|
|||
|
|
@ -977,7 +977,7 @@ static struct dentry *hugetlbfs_mkdir(const struct mnt_idmap *idmap, struct inod
|
|||
return ERR_PTR(retval);
|
||||
}
|
||||
|
||||
static int hugetlbfs_create(struct mnt_idmap *idmap,
|
||||
static int hugetlbfs_create(const struct mnt_idmap *idmap,
|
||||
struct inode *dir, struct dentry *dentry,
|
||||
umode_t mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
static int jffs2_readdir (struct file *, struct dir_context *);
|
||||
|
||||
static int jffs2_create (struct mnt_idmap *, struct inode *,
|
||||
static int jffs2_create (const struct mnt_idmap *, struct inode *,
|
||||
struct dentry *, umode_t);
|
||||
static struct dentry *jffs2_lookup (struct inode *,struct dentry *,
|
||||
unsigned int);
|
||||
|
|
@ -162,7 +162,7 @@ static int jffs2_readdir(struct file *file, struct dir_context *ctx)
|
|||
/***********************************************************************/
|
||||
|
||||
|
||||
static int jffs2_create(struct mnt_idmap *idmap, struct inode *dir_i,
|
||||
static int jffs2_create(const struct mnt_idmap *idmap, struct inode *dir_i,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct jffs2_raw_inode *ri;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ static inline void free_ea_wmap(struct inode *inode)
|
|||
* RETURN: Errors from subroutines
|
||||
*
|
||||
*/
|
||||
static int jfs_create(struct mnt_idmap *idmap, struct inode *dip,
|
||||
static int jfs_create(const struct mnt_idmap *idmap, struct inode *dip,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
int rc = 0;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ static int minix_tmpfile(const struct mnt_idmap *idmap, struct inode *dir,
|
|||
return finish_open_simple(file, 0);
|
||||
}
|
||||
|
||||
static int minix_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int minix_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
return minix_mknod(&nop_mnt_idmap, dir, dentry, mode, 0);
|
||||
|
|
|
|||
|
|
@ -2437,7 +2437,7 @@ static int nfs_do_create(struct inode *dir, struct dentry *dentry,
|
|||
return error;
|
||||
}
|
||||
|
||||
int nfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
int nfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
return nfs_do_create(dir, dentry, mode, O_EXCL);
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ extern unsigned long nfs_access_cache_scan(struct shrinker *shrink,
|
|||
struct shrink_control *sc);
|
||||
struct dentry *nfs_lookup(struct inode *, struct dentry *, unsigned int);
|
||||
void nfs_d_prune_case_insensitive_aliases(struct inode *inode);
|
||||
int nfs_create(struct mnt_idmap *, struct inode *, struct dentry *,
|
||||
int nfs_create(const struct mnt_idmap *, struct inode *, struct dentry *,
|
||||
umode_t);
|
||||
struct dentry *nfs_mkdir(const struct mnt_idmap *, struct inode *, struct dentry *,
|
||||
umode_t);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
|
|||
* If the create succeeds, we fill in the inode information
|
||||
* with d_instantiate().
|
||||
*/
|
||||
static int nilfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int nilfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct inode *inode;
|
||||
|
|
|
|||
|
|
@ -732,7 +732,7 @@ static struct ntfs_inode *__ntfs_create(const struct mnt_idmap *idmap, struct in
|
|||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
static int ntfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ntfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct ntfs_volume *vol = NTFS_SB(dir->i_sb);
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ static struct dentry *ntfs_lookup(struct inode *dir, struct dentry *dentry,
|
|||
/*
|
||||
* ntfs_create - inode_operations::create
|
||||
*/
|
||||
static int ntfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ntfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
return ntfs_create_inode(idmap, dir, dentry, NULL, S_IFREG | mode, 0,
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ static struct dentry *dlmfs_mkdir(const struct mnt_idmap * idmap,
|
|||
return ERR_PTR(status);
|
||||
}
|
||||
|
||||
static int dlmfs_create(struct mnt_idmap *idmap,
|
||||
static int dlmfs_create(const struct mnt_idmap *idmap,
|
||||
struct inode *dir,
|
||||
struct dentry *dentry,
|
||||
umode_t mode)
|
||||
|
|
|
|||
|
|
@ -671,7 +671,7 @@ static struct dentry *ocfs2_mkdir(const struct mnt_idmap *idmap,
|
|||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
static int ocfs2_create(struct mnt_idmap *idmap,
|
||||
static int ocfs2_create(const struct mnt_idmap *idmap,
|
||||
struct inode *dir,
|
||||
struct dentry *dentry,
|
||||
umode_t mode)
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ static struct dentry *omfs_mkdir(const struct mnt_idmap *idmap, struct inode *di
|
|||
return ERR_PTR(omfs_add_node(dir, dentry, mode));
|
||||
}
|
||||
|
||||
static int omfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int omfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
return omfs_add_node(dir, dentry, mode | S_IFREG);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
/*
|
||||
* Get a newly allocated inode to go with a negative dentry.
|
||||
*/
|
||||
static int orangefs_create(struct mnt_idmap *idmap,
|
||||
static int orangefs_create(const struct mnt_idmap *idmap,
|
||||
struct inode *dir,
|
||||
struct dentry *dentry,
|
||||
umode_t mode)
|
||||
|
|
|
|||
|
|
@ -730,7 +730,7 @@ static int ovl_create_object(const struct mnt_idmap *idmap, struct dentry *dentr
|
|||
return err;
|
||||
}
|
||||
|
||||
static int ovl_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ovl_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
return ovl_create_object(idmap, dentry, (mode & 07777) | S_IFREG, 0, NULL);
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ static struct dentry *ramfs_mkdir(const struct mnt_idmap *idmap, struct inode *d
|
|||
return ERR_PTR(retval);
|
||||
}
|
||||
|
||||
static int ramfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ramfs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
return ramfs_mknod(&nop_mnt_idmap, dir, dentry, mode | S_IFREG, 0);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ void cifs_sb_deactive(struct super_block *sb);
|
|||
/* Functions related to inodes */
|
||||
extern const struct inode_operations cifs_dir_inode_ops;
|
||||
struct inode *cifs_root_iget(struct super_block *sb);
|
||||
int cifs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
int cifs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *direntry, umode_t mode);
|
||||
int cifs_atomic_open(struct inode *dir, struct dentry *direntry,
|
||||
struct file *file, unsigned int oflags, umode_t mode);
|
||||
|
|
|
|||
|
|
@ -640,7 +640,7 @@ int cifs_atomic_open(struct inode *dir, struct dentry *direntry,
|
|||
* The initial dentry state is hashed-negative. On success, dentry will become
|
||||
* hashed-positive by calling d_instantiate().
|
||||
*/
|
||||
int cifs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
int cifs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *direntry, umode_t mode)
|
||||
{
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(dir);
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ static int ubifs_prepare_create(struct inode *dir, struct dentry *dentry,
|
|||
return fscrypt_setup_filename(dir, &dentry->d_name, 0, nm);
|
||||
}
|
||||
|
||||
static int ubifs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ubifs_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct inode *inode;
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ static int udf_add_nondir(struct dentry *dentry, struct inode *inode)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int udf_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int udf_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct inode *inode = udf_new_inode(dir, mode);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, unsi
|
|||
* If the create succeeds, we fill in the inode information
|
||||
* with d_instantiate().
|
||||
*/
|
||||
static int ufs_create (struct mnt_idmap * idmap,
|
||||
static int ufs_create (const struct mnt_idmap * idmap,
|
||||
struct inode * dir, struct dentry * dentry, umode_t mode)
|
||||
{
|
||||
struct inode *inode;
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ static int vboxsf_dir_create(struct inode *parent, struct dentry *dentry,
|
|||
return err;
|
||||
}
|
||||
|
||||
static int vboxsf_dir_mkfile(struct mnt_idmap *idmap,
|
||||
static int vboxsf_dir_mkfile(const struct mnt_idmap *idmap,
|
||||
struct inode *parent, struct dentry *dentry,
|
||||
umode_t mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ xfs_vn_mknod(
|
|||
|
||||
STATIC int
|
||||
xfs_vn_create(
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct inode *dir,
|
||||
struct dentry *dentry,
|
||||
umode_t mode)
|
||||
|
|
|
|||
|
|
@ -1999,7 +1999,7 @@ struct inode_operations {
|
|||
|
||||
int (*readlink) (struct dentry *, char __user *,int);
|
||||
|
||||
int (*create) (struct mnt_idmap *, struct inode *,struct dentry *,
|
||||
int (*create) (const struct mnt_idmap *, struct inode *,struct dentry *,
|
||||
umode_t);
|
||||
int (*link) (struct dentry *,struct inode *,struct dentry *);
|
||||
int (*unlink) (struct inode *,struct dentry *);
|
||||
|
|
|
|||
|
|
@ -607,7 +607,7 @@ static int mqueue_create_attr(struct dentry *dentry, umode_t mode, void *arg)
|
|||
return error;
|
||||
}
|
||||
|
||||
static int mqueue_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int mqueue_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
return mqueue_create_attr(dentry, mode, NULL);
|
||||
|
|
|
|||
|
|
@ -3897,7 +3897,7 @@ static struct dentry *shmem_mkdir(const struct mnt_idmap *idmap, struct inode *d
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static int shmem_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int shmem_create(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
return shmem_mknod(idmap, dir, dentry, mode | S_IFREG, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user