mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
Merge tag 'vfs-7.4-rc1.idmap' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull vfs idmap constification from Christian Brauner:
"This makes struct mnt_idmap const throughout the tree.
A mount's idmapping is immutable. The only thing modified after
alloc_mnt_idmap() is the reference count and that is hidden behind
mnt_idmap_get() and mnt_idmap_put(). Everything else only reads from
it. That is the same model struct cred uses and the idmapping is
sensitive enough to deserve it.
The conversion goes bottom up through the vfs{g,u}id and fs{g,u}id
helpers, the privilege checks, acl, xattr and quota and then every
inode operation that takes an idmap, so ->permission(), ->getattr(),
->setattr(), ->create(), ->mkdir(), ->mknod(), ->symlink(),
->rename(), ->tmpfile(), ->get_acl(), ->set_acl() and ->fileattr_set()
with their implementations in every filesystem, plus the LSM hooks.
struct vfsmount, struct mount_kattr and struct kstatmount store a
const pointer and nop_mnt_idmap and invalid_mnt_idmap live in rodata,
so anything that tries to modify them faults instead of silently
corrupting the initial idmapping"
* tag 'vfs-7.4-rc1.idmap' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (27 commits)
fs: make nop_mnt_idmap and invalid_mnt_idmap const
fs: port mnt_idmap() and file_mnt_idmap() to const mnt_idmap
fs: port vfs_*() helpers to const mnt_idmap
fs: port ->setattr() to pass const mnt_idmap
fs: port ->getattr() to pass const mnt_idmap
fs: port ->create() to pass const mnt_idmap
fs: port ->symlink() to pass const mnt_idmap
fs: port ->mkdir() to pass const mnt_idmap
fs: port ->rename() to pass const mnt_idmap
fs: port ->mknod() to pass const mnt_idmap
fs: port ->tmpfile() to pass const mnt_idmap
fs: port ->get_acl() to pass const mnt_idmap
fs: port ->set_acl() to pass const mnt_idmap
fs: port ->fileattr_set() to pass const mnt_idmap
fs: port xattr to const mnt_idmap
fs: port ->permission() to pass const mnt_idmap
fs: port acl to const mnt_idmap
fs: port inode_init_owner() to const mnt_idmap
fs: port inode_owner_or_capable() to const mnt_idmap
fs: port privilege checking helpers to const mnt_idmap
...
This commit is contained in:
@@ -61,23 +61,23 @@ 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 *);
|
||||
int (*symlink) (struct mnt_idmap *, struct inode *,struct dentry *,const char *);
|
||||
struct dentry *(*mkdir) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t);
|
||||
int (*symlink) (const struct mnt_idmap *, struct inode *,struct dentry *,const char *);
|
||||
struct dentry *(*mkdir) (const struct mnt_idmap *, struct inode *,struct dentry *,umode_t);
|
||||
int (*rmdir) (struct inode *,struct dentry *);
|
||||
int (*mknod) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t,dev_t);
|
||||
int (*rename) (struct mnt_idmap *, struct inode *, struct dentry *,
|
||||
int (*mknod) (const struct mnt_idmap *, struct inode *,struct dentry *,umode_t,dev_t);
|
||||
int (*rename) (const struct mnt_idmap *, struct inode *, struct dentry *,
|
||||
struct inode *, struct dentry *, unsigned int);
|
||||
int (*readlink) (struct dentry *, char __user *,int);
|
||||
const char *(*get_link) (struct dentry *, struct inode *, struct delayed_call *);
|
||||
void (*truncate) (struct inode *);
|
||||
int (*permission) (struct mnt_idmap *, struct inode *, int, unsigned int);
|
||||
int (*permission) (const struct mnt_idmap *, struct inode *, int, unsigned int);
|
||||
struct posix_acl * (*get_inode_acl)(struct inode *, int, bool);
|
||||
int (*setattr) (struct mnt_idmap *, struct dentry *, struct iattr *);
|
||||
int (*getattr) (struct mnt_idmap *, const struct path *, struct kstat *, u32, unsigned int);
|
||||
int (*setattr) (const struct mnt_idmap *, struct dentry *, struct iattr *);
|
||||
int (*getattr) (const struct mnt_idmap *, const struct path *, struct kstat *, u32, unsigned int);
|
||||
ssize_t (*listxattr) (struct dentry *, char *, size_t);
|
||||
int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);
|
||||
void (*update_time)(struct inode *inode, enum fs_update_time type,
|
||||
@@ -86,12 +86,12 @@ prototypes::
|
||||
int (*atomic_open)(struct inode *, struct dentry *,
|
||||
struct file *, unsigned open_flag,
|
||||
umode_t create_mode);
|
||||
int (*tmpfile) (struct mnt_idmap *, struct inode *,
|
||||
int (*tmpfile) (const struct mnt_idmap *, struct inode *,
|
||||
struct file *, umode_t);
|
||||
int (*fileattr_set)(struct mnt_idmap *idmap,
|
||||
int (*fileattr_set)(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa);
|
||||
int (*fileattr_get)(struct dentry *dentry, struct file_kattr *fa);
|
||||
struct posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int);
|
||||
struct posix_acl * (*get_acl)(const struct mnt_idmap *, struct dentry *, int);
|
||||
struct offset_ctx *(*get_offset_ctx)(struct inode *inode);
|
||||
|
||||
locking rules:
|
||||
@@ -148,7 +148,7 @@ prototypes::
|
||||
struct inode *inode, const char *name, void *buffer,
|
||||
size_t size);
|
||||
int (*set)(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct inode *inode, const char *name,
|
||||
const void *buffer, size_t size, int flags);
|
||||
|
||||
|
||||
@@ -1409,3 +1409,16 @@ use only if you have no alternative.
|
||||
The .create inode_operation no longer receives the 'excl' arg. It must
|
||||
always assume the file does not already exist. If the filesystem needs
|
||||
to be involved in non-exclusive create, it should provide atomic_open.
|
||||
|
||||
---
|
||||
|
||||
**mandatory**
|
||||
|
||||
All struct mnt_idmap pointers handed to filesystems are const now.
|
||||
->create(), ->mkdir(), ->mknod(), ->symlink(), ->rename(), ->setattr(),
|
||||
->getattr(), ->permission(), ->tmpfile(), ->get_acl(), ->set_acl() and
|
||||
->fileattr_set() as well as the xattr ->set() handler and the vfs_*()
|
||||
helpers take a const struct mnt_idmap *. mnt_idmap() and file_mnt_idmap()
|
||||
return one. The idmapping is immutable so nothing should have modified it
|
||||
anyway. References are taken and dropped via mnt_idmap_get() and
|
||||
mnt_idmap_put() as before, both accept a const pointer.
|
||||
|
||||
@@ -415,33 +415,33 @@ 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 *);
|
||||
int (*symlink) (struct mnt_idmap *, struct inode *,struct dentry *,const char *);
|
||||
struct dentry *(*mkdir) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t);
|
||||
int (*symlink) (const struct mnt_idmap *, struct inode *,struct dentry *,const char *);
|
||||
struct dentry *(*mkdir) (const struct mnt_idmap *, struct inode *,struct dentry *,umode_t);
|
||||
int (*rmdir) (struct inode *,struct dentry *);
|
||||
int (*mknod) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t,dev_t);
|
||||
int (*rename) (struct mnt_idmap *, struct inode *, struct dentry *,
|
||||
int (*mknod) (const struct mnt_idmap *, struct inode *,struct dentry *,umode_t,dev_t);
|
||||
int (*rename) (const struct mnt_idmap *, struct inode *, struct dentry *,
|
||||
struct inode *, struct dentry *, unsigned int);
|
||||
int (*readlink) (struct dentry *, char __user *,int);
|
||||
const char *(*get_link) (struct dentry *, struct inode *,
|
||||
struct delayed_call *);
|
||||
int (*permission) (struct mnt_idmap *, struct inode *, int);
|
||||
int (*permission) (const struct mnt_idmap *, struct inode *, int);
|
||||
struct posix_acl * (*get_inode_acl)(struct inode *, int, bool);
|
||||
int (*setattr) (struct mnt_idmap *, struct dentry *, struct iattr *);
|
||||
int (*getattr) (struct mnt_idmap *, const struct path *, struct kstat *, u32, unsigned int);
|
||||
int (*setattr) (const struct mnt_idmap *, struct dentry *, struct iattr *);
|
||||
int (*getattr) (const struct mnt_idmap *, const struct path *, struct kstat *, u32, unsigned int);
|
||||
ssize_t (*listxattr) (struct dentry *, char *, size_t);
|
||||
void (*update_time)(struct inode *inode, enum fs_update_time type,
|
||||
int flags);
|
||||
void (*sync_lazytime)(struct inode *inode);
|
||||
int (*atomic_open)(struct inode *, struct dentry *, struct file *,
|
||||
unsigned open_flag, umode_t create_mode);
|
||||
int (*tmpfile) (struct mnt_idmap *, struct inode *, struct file *, umode_t);
|
||||
struct posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int);
|
||||
int (*set_acl)(struct mnt_idmap *, struct dentry *, struct posix_acl *, int);
|
||||
int (*fileattr_set)(struct mnt_idmap *idmap,
|
||||
int (*tmpfile) (const struct mnt_idmap *, struct inode *, struct file *, umode_t);
|
||||
struct posix_acl * (*get_acl)(const struct mnt_idmap *, struct dentry *, int);
|
||||
int (*set_acl)(const struct mnt_idmap *, struct dentry *, struct posix_acl *, int);
|
||||
int (*fileattr_set)(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa);
|
||||
int (*fileattr_get)(struct dentry *dentry, struct file_kattr *fa);
|
||||
struct offset_ctx *(*get_offset_ctx)(struct inode *inode);
|
||||
|
||||
@@ -92,7 +92,7 @@ out:
|
||||
}
|
||||
|
||||
static int
|
||||
spufs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
spufs_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
@@ -340,7 +340,7 @@ static inline bool is_binderfs_control_device(const struct dentry *dentry)
|
||||
return info->control_dentry == dentry;
|
||||
}
|
||||
|
||||
static int binderfs_rename(struct mnt_idmap *idmap,
|
||||
static int binderfs_rename(const struct mnt_idmap *idmap,
|
||||
struct inode *old_dir, struct dentry *old_dentry,
|
||||
struct inode *new_dir, struct dentry *new_dentry,
|
||||
unsigned int flags)
|
||||
|
||||
@@ -343,7 +343,7 @@ static inline bool is_binderfs_control_device(const struct dentry *dentry)
|
||||
return info->control_dentry == dentry;
|
||||
}
|
||||
|
||||
static int binderfs_rename(struct mnt_idmap *idmap,
|
||||
static int binderfs_rename(const struct mnt_idmap *idmap,
|
||||
struct inode *old_dir, struct dentry *old_dentry,
|
||||
struct inode *new_dir, struct dentry *new_dentry,
|
||||
unsigned int flags)
|
||||
|
||||
+2
-2
@@ -140,7 +140,7 @@ struct posix_acl *v9fs_iop_get_inode_acl(struct inode *inode, int type, bool rcu
|
||||
|
||||
}
|
||||
|
||||
struct posix_acl *v9fs_iop_get_acl(struct mnt_idmap *idmap,
|
||||
struct posix_acl *v9fs_iop_get_acl(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, int type)
|
||||
{
|
||||
struct v9fs_session_info *v9ses;
|
||||
@@ -152,7 +152,7 @@ struct posix_acl *v9fs_iop_get_acl(struct mnt_idmap *idmap,
|
||||
return v9fs_get_cached_acl(d_inode(dentry), type);
|
||||
}
|
||||
|
||||
int v9fs_iop_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int v9fs_iop_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type)
|
||||
{
|
||||
int retval;
|
||||
|
||||
+2
-2
@@ -10,9 +10,9 @@
|
||||
int v9fs_get_acl(struct inode *inode, struct p9_fid *fid);
|
||||
struct posix_acl *v9fs_iop_get_inode_acl(struct inode *inode, int type,
|
||||
bool rcu);
|
||||
struct posix_acl *v9fs_iop_get_acl(struct mnt_idmap *idmap,
|
||||
struct posix_acl *v9fs_iop_get_acl(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, int type);
|
||||
int v9fs_iop_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int v9fs_iop_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type);
|
||||
int v9fs_acl_chmod(struct inode *inode, struct p9_fid *fid);
|
||||
int v9fs_set_create_acl(struct inode *inode, struct p9_fid *fid,
|
||||
|
||||
+1
-1
@@ -189,7 +189,7 @@ extern struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
|
||||
unsigned int flags);
|
||||
extern int v9fs_vfs_unlink(struct inode *i, struct dentry *d);
|
||||
extern int v9fs_vfs_rmdir(struct inode *i, struct dentry *d);
|
||||
extern int v9fs_vfs_rename(struct mnt_idmap *idmap,
|
||||
extern int v9fs_vfs_rename(const struct mnt_idmap *idmap,
|
||||
struct inode *old_dir, struct dentry *old_dentry,
|
||||
struct inode *new_dir, struct dentry *new_dentry,
|
||||
unsigned int flags);
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ int v9fs_file_open(struct inode *inode, struct file *file);
|
||||
int v9fs_uflags2omode(int uflags, int extended);
|
||||
|
||||
void v9fs_blank_wstat(struct p9_wstat *wstat);
|
||||
int v9fs_vfs_setattr_dotl(struct mnt_idmap *idmap,
|
||||
int v9fs_vfs_setattr_dotl(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct iattr *iattr);
|
||||
int v9fs_file_fsync_dotl(struct file *filp, loff_t start, loff_t end,
|
||||
int datasync);
|
||||
|
||||
+7
-7
@@ -652,7 +652,7 @@ error:
|
||||
*/
|
||||
|
||||
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);
|
||||
@@ -679,7 +679,7 @@ v9fs_vfs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
*
|
||||
*/
|
||||
|
||||
static struct dentry *v9fs_vfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *v9fs_vfs_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
u32 perm;
|
||||
@@ -858,7 +858,7 @@ int v9fs_vfs_rmdir(struct inode *i, struct dentry *d)
|
||||
*/
|
||||
|
||||
int
|
||||
v9fs_vfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
v9fs_vfs_rename(const struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
struct dentry *old_dentry, struct inode *new_dir,
|
||||
struct dentry *new_dentry, unsigned int flags)
|
||||
{
|
||||
@@ -966,7 +966,7 @@ error:
|
||||
*/
|
||||
|
||||
static int
|
||||
v9fs_vfs_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
v9fs_vfs_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask, unsigned int flags)
|
||||
{
|
||||
struct dentry *dentry = path->dentry;
|
||||
@@ -1014,7 +1014,7 @@ v9fs_vfs_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
*
|
||||
*/
|
||||
|
||||
static int v9fs_vfs_setattr(struct mnt_idmap *idmap,
|
||||
static int v9fs_vfs_setattr(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct iattr *iattr)
|
||||
{
|
||||
int retval, use_dentry = 0;
|
||||
@@ -1249,7 +1249,7 @@ static int v9fs_vfs_mkspecial(struct inode *dir, struct dentry *dentry,
|
||||
*/
|
||||
|
||||
static int
|
||||
v9fs_vfs_symlink(struct mnt_idmap *idmap, struct inode *dir,
|
||||
v9fs_vfs_symlink(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, const char *symname)
|
||||
{
|
||||
p9_debug(P9_DEBUG_VFS, " %llu,%pd,%s\n",
|
||||
@@ -1304,7 +1304,7 @@ v9fs_vfs_link(struct dentry *old_dentry, struct inode *dir,
|
||||
*/
|
||||
|
||||
static int
|
||||
v9fs_vfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
|
||||
v9fs_vfs_mknod(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode, dev_t rdev)
|
||||
{
|
||||
struct v9fs_session_info *v9ses = v9fs_inode2v9ses(dir);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "acl.h"
|
||||
|
||||
static int
|
||||
v9fs_vfs_mknod_dotl(struct mnt_idmap *idmap, struct inode *dir,
|
||||
v9fs_vfs_mknod_dotl(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t omode, dev_t rdev);
|
||||
|
||||
/**
|
||||
@@ -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);
|
||||
@@ -344,7 +344,7 @@ out:
|
||||
*
|
||||
*/
|
||||
|
||||
static struct dentry *v9fs_vfs_mkdir_dotl(struct mnt_idmap *idmap,
|
||||
static struct dentry *v9fs_vfs_mkdir_dotl(const struct mnt_idmap *idmap,
|
||||
struct inode *dir, struct dentry *dentry,
|
||||
umode_t omode)
|
||||
{
|
||||
@@ -414,7 +414,7 @@ error:
|
||||
}
|
||||
|
||||
static int
|
||||
v9fs_vfs_getattr_dotl(struct mnt_idmap *idmap,
|
||||
v9fs_vfs_getattr_dotl(const struct mnt_idmap *idmap,
|
||||
const struct path *path, struct kstat *stat,
|
||||
u32 request_mask, unsigned int flags)
|
||||
{
|
||||
@@ -508,7 +508,7 @@ static int v9fs_mapped_iattr_valid(int iattr_valid)
|
||||
*
|
||||
*/
|
||||
|
||||
int v9fs_vfs_setattr_dotl(struct mnt_idmap *idmap,
|
||||
int v9fs_vfs_setattr_dotl(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct iattr *iattr)
|
||||
{
|
||||
int retval, use_dentry = 0;
|
||||
@@ -682,7 +682,7 @@ v9fs_stat2inode_dotl(struct p9_stat_dotl *stat, struct inode *inode,
|
||||
}
|
||||
|
||||
static int
|
||||
v9fs_vfs_symlink_dotl(struct mnt_idmap *idmap, struct inode *dir,
|
||||
v9fs_vfs_symlink_dotl(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, const char *symname)
|
||||
{
|
||||
int err;
|
||||
@@ -809,7 +809,7 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir,
|
||||
*
|
||||
*/
|
||||
static int
|
||||
v9fs_vfs_mknod_dotl(struct mnt_idmap *idmap, struct inode *dir,
|
||||
v9fs_vfs_mknod_dotl(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t omode, dev_t rdev)
|
||||
{
|
||||
int err;
|
||||
|
||||
+1
-1
@@ -153,7 +153,7 @@ static int v9fs_xattr_handler_get(const struct xattr_handler *handler,
|
||||
}
|
||||
|
||||
static int v9fs_xattr_handler_set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ struct adfs_discmap {
|
||||
/* Inode stuff */
|
||||
struct inode *adfs_iget(struct super_block *sb, struct object_info *obj);
|
||||
int adfs_write_inode(struct inode *inode, struct writeback_control *wbc);
|
||||
int adfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int adfs_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr);
|
||||
|
||||
/* map.c */
|
||||
|
||||
+1
-1
@@ -299,7 +299,7 @@ out:
|
||||
* later.
|
||||
*/
|
||||
int
|
||||
adfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *attr)
|
||||
adfs_setattr(const struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *attr)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
struct super_block *sb = inode->i_sb;
|
||||
|
||||
+5
-5
@@ -166,17 +166,17 @@ 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(struct mnt_idmap *idmap, struct inode *dir,
|
||||
extern struct dentry *affs_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode);
|
||||
extern int affs_rmdir(struct inode *dir, struct dentry *dentry);
|
||||
extern int affs_link(struct dentry *olddentry, struct inode *dir,
|
||||
struct dentry *dentry);
|
||||
extern int affs_symlink(struct mnt_idmap *idmap,
|
||||
extern int affs_symlink(const struct mnt_idmap *idmap,
|
||||
struct inode *dir, struct dentry *dentry,
|
||||
const char *symname);
|
||||
extern int affs_rename2(struct mnt_idmap *idmap,
|
||||
extern int affs_rename2(const struct mnt_idmap *idmap,
|
||||
struct inode *old_dir, struct dentry *old_dentry,
|
||||
struct inode *new_dir, struct dentry *new_dentry,
|
||||
unsigned int flags);
|
||||
@@ -184,7 +184,7 @@ extern int affs_rename2(struct mnt_idmap *idmap,
|
||||
/* inode.c */
|
||||
|
||||
extern struct inode *affs_new_inode(struct inode *dir);
|
||||
extern int affs_setattr(struct mnt_idmap *idmap,
|
||||
extern int affs_setattr(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct iattr *attr);
|
||||
extern void affs_evict_inode(struct inode *inode);
|
||||
extern struct inode *affs_iget(struct super_block *sb,
|
||||
|
||||
+1
-1
@@ -213,7 +213,7 @@ affs_write_inode(struct inode *inode, struct writeback_control *wbc)
|
||||
}
|
||||
|
||||
int
|
||||
affs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *attr)
|
||||
affs_setattr(const struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *attr)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
int error;
|
||||
|
||||
+4
-4
@@ -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;
|
||||
@@ -274,7 +274,7 @@ affs_create(struct mnt_idmap *idmap, struct inode *dir,
|
||||
}
|
||||
|
||||
struct dentry *
|
||||
affs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
affs_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct inode *inode;
|
||||
@@ -313,7 +313,7 @@ affs_rmdir(struct inode *dir, struct dentry *dentry)
|
||||
}
|
||||
|
||||
int
|
||||
affs_symlink(struct mnt_idmap *idmap, struct inode *dir,
|
||||
affs_symlink(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, const char *symname)
|
||||
{
|
||||
struct super_block *sb = dir->i_sb;
|
||||
@@ -503,7 +503,7 @@ done:
|
||||
return retval;
|
||||
}
|
||||
|
||||
int affs_rename2(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
int affs_rename2(const struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
struct dentry *old_dentry, struct inode *new_dir,
|
||||
struct dentry *new_dentry, unsigned int flags)
|
||||
{
|
||||
|
||||
+8
-8
@@ -33,17 +33,17 @@ 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(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *afs_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode);
|
||||
static int afs_rmdir(struct inode *dir, struct dentry *dentry);
|
||||
static int afs_unlink(struct inode *dir, struct dentry *dentry);
|
||||
static int afs_link(struct dentry *from, struct inode *dir,
|
||||
struct dentry *dentry);
|
||||
static int afs_symlink(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int afs_symlink(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, const char *content);
|
||||
static int afs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
static int afs_rename(const struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
struct dentry *old_dentry, struct inode *new_dir,
|
||||
struct dentry *new_dentry, unsigned int flags);
|
||||
static int afs_dir_writepages(struct address_space *mapping,
|
||||
@@ -1310,7 +1310,7 @@ static const struct afs_operation_ops afs_mkdir_operation = {
|
||||
/*
|
||||
* create a directory on an AFS filesystem
|
||||
*/
|
||||
static struct dentry *afs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *afs_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct afs_operation *op;
|
||||
@@ -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;
|
||||
@@ -1779,7 +1779,7 @@ static const struct afs_operation_ops afs_symlink_operation = {
|
||||
/*
|
||||
* create a symlink in an AFS filesystem
|
||||
*/
|
||||
static int afs_symlink(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int afs_symlink(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, const char *content)
|
||||
{
|
||||
struct afs_operation *op;
|
||||
@@ -2067,7 +2067,7 @@ static const struct afs_operation_ops afs_rename_exchange_operation = {
|
||||
/*
|
||||
* rename a file in an AFS filesystem and/or move it between directories
|
||||
*/
|
||||
static int afs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
static int afs_rename(const struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
struct dentry *old_dentry, struct inode *new_dir,
|
||||
struct dentry *new_dentry, unsigned int flags)
|
||||
{
|
||||
|
||||
+2
-2
@@ -596,7 +596,7 @@ error:
|
||||
/*
|
||||
* read the attributes of an inode
|
||||
*/
|
||||
int afs_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int afs_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask, unsigned int query_flags)
|
||||
{
|
||||
struct inode *inode = d_inode(path->dentry);
|
||||
@@ -759,7 +759,7 @@ static const struct afs_operation_ops afs_setattr_operation = {
|
||||
/*
|
||||
* set the attributes of an inode
|
||||
*/
|
||||
int afs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int afs_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr)
|
||||
{
|
||||
const unsigned int supported =
|
||||
|
||||
+3
-3
@@ -1268,9 +1268,9 @@ extern int afs_fetch_status(struct afs_vnode *, struct key *, bool, afs_access_t
|
||||
extern int afs_ilookup5_test_by_fid(struct inode *, void *);
|
||||
extern struct inode *afs_iget(struct afs_operation *, struct afs_vnode_param *);
|
||||
extern struct inode *afs_root_iget(struct super_block *, struct key *);
|
||||
extern int afs_getattr(struct mnt_idmap *idmap, const struct path *,
|
||||
extern int afs_getattr(const struct mnt_idmap *idmap, const struct path *,
|
||||
struct kstat *, u32, unsigned int);
|
||||
extern int afs_setattr(struct mnt_idmap *idmap, struct dentry *, struct iattr *);
|
||||
extern int afs_setattr(const struct mnt_idmap *idmap, struct dentry *, struct iattr *);
|
||||
extern void afs_evict_inode(struct inode *);
|
||||
extern int afs_drop_inode(struct inode *);
|
||||
|
||||
@@ -1540,7 +1540,7 @@ extern void afs_cache_permit(struct afs_vnode *, struct key *, unsigned int,
|
||||
extern struct key *afs_request_key(struct afs_cell *);
|
||||
extern struct key *afs_request_key_rcu(struct afs_cell *);
|
||||
extern int afs_check_permit(struct afs_vnode *, struct key *, afs_access_t *);
|
||||
extern int afs_permission(struct mnt_idmap *, struct inode *, int);
|
||||
extern int afs_permission(const struct mnt_idmap *, struct inode *, int);
|
||||
extern void __exit afs_clean_up_permit_cache(void);
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -428,7 +428,7 @@ int afs_check_permit(struct afs_vnode *vnode, struct key *key,
|
||||
* - AFS ACLs are attached to directories only, and a file is controlled by its
|
||||
* parent directory's ACL
|
||||
*/
|
||||
int afs_permission(struct mnt_idmap *idmap, struct inode *inode,
|
||||
int afs_permission(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
int mask)
|
||||
{
|
||||
struct afs_vnode *vnode = AFS_FS_I(inode);
|
||||
|
||||
+2
-2
@@ -97,7 +97,7 @@ static const struct afs_operation_ops afs_store_acl_operation = {
|
||||
* Set a file's AFS3 ACL.
|
||||
*/
|
||||
static int afs_xattr_set_acl(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry,
|
||||
struct inode *inode, const char *name,
|
||||
const void *buffer, size_t size, int flags)
|
||||
@@ -228,7 +228,7 @@ static const struct afs_operation_ops yfs_store_opaque_acl2_operation = {
|
||||
* Set a file's YFS ACL.
|
||||
*/
|
||||
static int afs_xattr_set_yfs(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry,
|
||||
struct inode *inode, const char *name,
|
||||
const void *buffer, size_t size, int flags)
|
||||
|
||||
+2
-2
@@ -46,7 +46,7 @@ static struct inode *anon_inode_inode __ro_after_init;
|
||||
* Rather than mess with our internal sane inode data, just fix it
|
||||
* up here in getattr() by masking off the format bits.
|
||||
*/
|
||||
int anon_inode_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int anon_inode_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask,
|
||||
unsigned int query_flags)
|
||||
{
|
||||
@@ -57,7 +57,7 @@ int anon_inode_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int anon_inode_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int anon_inode_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
*
|
||||
* Return: ATTR_KILL_SGID if setgid bit needs to be removed, 0 otherwise.
|
||||
*/
|
||||
int setattr_should_drop_sgid(struct mnt_idmap *idmap,
|
||||
int setattr_should_drop_sgid(const struct mnt_idmap *idmap,
|
||||
const struct inode *inode)
|
||||
{
|
||||
umode_t mode = inode->i_mode;
|
||||
@@ -60,7 +60,7 @@ EXPORT_SYMBOL(setattr_should_drop_sgid);
|
||||
* Return: A mask of ATTR_KILL_S{G,U}ID indicating which - if any - setid bits
|
||||
* to remove, 0 otherwise.
|
||||
*/
|
||||
int setattr_should_drop_suidgid(struct mnt_idmap *idmap,
|
||||
int setattr_should_drop_suidgid(const struct mnt_idmap *idmap,
|
||||
struct inode *inode)
|
||||
{
|
||||
umode_t mode = inode->i_mode;
|
||||
@@ -91,7 +91,7 @@ EXPORT_SYMBOL(setattr_should_drop_suidgid);
|
||||
* permissions. On non-idmapped mounts or if permission checking is to be
|
||||
* performed on the raw inode simply pass @nop_mnt_idmap.
|
||||
*/
|
||||
static bool chown_ok(struct mnt_idmap *idmap,
|
||||
static bool chown_ok(const struct mnt_idmap *idmap,
|
||||
const struct inode *inode, vfsuid_t ia_vfsuid)
|
||||
{
|
||||
vfsuid_t vfsuid = i_uid_into_vfsuid(idmap, inode);
|
||||
@@ -118,7 +118,7 @@ static bool chown_ok(struct mnt_idmap *idmap,
|
||||
* permissions. On non-idmapped mounts or if permission checking is to be
|
||||
* performed on the raw inode simply pass @nop_mnt_idmap.
|
||||
*/
|
||||
static bool chgrp_ok(struct mnt_idmap *idmap,
|
||||
static bool chgrp_ok(const struct mnt_idmap *idmap,
|
||||
const struct inode *inode, vfsgid_t ia_vfsgid)
|
||||
{
|
||||
vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode);
|
||||
@@ -158,7 +158,7 @@ static bool chgrp_ok(struct mnt_idmap *idmap,
|
||||
* Should be called as the first thing in ->setattr implementations,
|
||||
* possibly after taking additional locks.
|
||||
*/
|
||||
int setattr_prepare(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int setattr_prepare(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
@@ -339,7 +339,7 @@ static void setattr_copy_mgtime(struct inode *inode, const struct iattr *attr)
|
||||
* that for "simple" filesystems, the struct inode is the inode storage.
|
||||
* The caller is free to mark the inode dirty afterwards if needed.
|
||||
*/
|
||||
void setattr_copy(struct mnt_idmap *idmap, struct inode *inode,
|
||||
void setattr_copy(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
const struct iattr *attr)
|
||||
{
|
||||
unsigned int ia_valid = attr->ia_valid;
|
||||
@@ -369,7 +369,7 @@ void setattr_copy(struct mnt_idmap *idmap, struct inode *inode,
|
||||
}
|
||||
EXPORT_SYMBOL(setattr_copy);
|
||||
|
||||
int may_setattr(struct mnt_idmap *idmap, struct inode *inode,
|
||||
int may_setattr(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
unsigned int ia_valid)
|
||||
{
|
||||
int error;
|
||||
@@ -424,7 +424,7 @@ EXPORT_SYMBOL(may_setattr);
|
||||
* permissions. On non-idmapped mounts or if permission checking is to be
|
||||
* performed on the raw inode simply pass @nop_mnt_idmap.
|
||||
*/
|
||||
int notify_change(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int notify_change(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr, struct delegated_inode *delegated_inode)
|
||||
{
|
||||
struct inode *inode = dentry->d_inode;
|
||||
|
||||
+6
-6
@@ -11,12 +11,12 @@
|
||||
|
||||
#include "autofs_i.h"
|
||||
|
||||
static int autofs_dir_permission(struct mnt_idmap *, struct inode *, int);
|
||||
static int autofs_dir_symlink(struct mnt_idmap *, struct inode *,
|
||||
static int autofs_dir_permission(const struct mnt_idmap *, struct inode *, int);
|
||||
static int autofs_dir_symlink(const struct mnt_idmap *, struct inode *,
|
||||
struct dentry *, const char *);
|
||||
static int autofs_dir_unlink(struct inode *, struct dentry *);
|
||||
static int autofs_dir_rmdir(struct inode *, struct dentry *);
|
||||
static struct dentry *autofs_dir_mkdir(struct mnt_idmap *, struct inode *,
|
||||
static struct dentry *autofs_dir_mkdir(const struct mnt_idmap *, struct inode *,
|
||||
struct dentry *, umode_t);
|
||||
static long autofs_root_ioctl(struct file *, unsigned int, unsigned long);
|
||||
#ifdef CONFIG_COMPAT
|
||||
@@ -552,7 +552,7 @@ static struct dentry *autofs_lookup(struct inode *dir,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int autofs_dir_permission(struct mnt_idmap *idmap,
|
||||
static int autofs_dir_permission(const struct mnt_idmap *idmap,
|
||||
struct inode *inode, int mask)
|
||||
{
|
||||
if (mask & MAY_WRITE) {
|
||||
@@ -572,7 +572,7 @@ static int autofs_dir_permission(struct mnt_idmap *idmap,
|
||||
return generic_permission(idmap, inode, mask);
|
||||
}
|
||||
|
||||
static int autofs_dir_symlink(struct mnt_idmap *idmap,
|
||||
static int autofs_dir_symlink(const struct mnt_idmap *idmap,
|
||||
struct inode *dir, struct dentry *dentry,
|
||||
const char *symname)
|
||||
{
|
||||
@@ -724,7 +724,7 @@ static int autofs_dir_rmdir(struct inode *dir, struct dentry *dentry)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dentry *autofs_dir_mkdir(struct mnt_idmap *idmap,
|
||||
static struct dentry *autofs_dir_mkdir(const struct mnt_idmap *idmap,
|
||||
struct inode *dir, struct dentry *dentry,
|
||||
umode_t mode)
|
||||
{
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ struct file *backing_tmpfile_open(const struct file *user_file, int flags,
|
||||
const struct path *real_parentpath,
|
||||
umode_t mode, const struct cred *cred)
|
||||
{
|
||||
struct mnt_idmap *real_idmap = mnt_idmap(real_parentpath->mnt);
|
||||
const struct mnt_idmap *real_idmap = mnt_idmap(real_parentpath->mnt);
|
||||
const struct path *user_path = &user_file->f_path;
|
||||
struct file *f;
|
||||
int error;
|
||||
|
||||
+10
-10
@@ -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)
|
||||
{
|
||||
@@ -51,14 +51,14 @@ static int bad_inode_unlink(struct inode *dir, struct dentry *dentry)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int bad_inode_symlink(struct mnt_idmap *idmap,
|
||||
static int bad_inode_symlink(const struct mnt_idmap *idmap,
|
||||
struct inode *dir, struct dentry *dentry,
|
||||
const char *symname)
|
||||
{
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static struct dentry *bad_inode_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *bad_inode_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
return ERR_PTR(-EIO);
|
||||
@@ -69,13 +69,13 @@ static int bad_inode_rmdir (struct inode *dir, struct dentry *dentry)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int bad_inode_mknod(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int bad_inode_mknod(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode, dev_t rdev)
|
||||
{
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int bad_inode_rename2(struct mnt_idmap *idmap,
|
||||
static int bad_inode_rename2(const struct mnt_idmap *idmap,
|
||||
struct inode *old_dir, struct dentry *old_dentry,
|
||||
struct inode *new_dir, struct dentry *new_dentry,
|
||||
unsigned int flags)
|
||||
@@ -89,20 +89,20 @@ static int bad_inode_readlink(struct dentry *dentry, char __user *buffer,
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int bad_inode_permission(struct mnt_idmap *idmap,
|
||||
static int bad_inode_permission(const struct mnt_idmap *idmap,
|
||||
struct inode *inode, int mask)
|
||||
{
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int bad_inode_getattr(struct mnt_idmap *idmap,
|
||||
static int bad_inode_getattr(const struct mnt_idmap *idmap,
|
||||
const struct path *path, struct kstat *stat,
|
||||
u32 request_mask, unsigned int query_flags)
|
||||
{
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int bad_inode_setattr(struct mnt_idmap *idmap,
|
||||
static int bad_inode_setattr(const struct mnt_idmap *idmap,
|
||||
struct dentry *direntry, struct iattr *attrs)
|
||||
{
|
||||
return -EIO;
|
||||
@@ -146,14 +146,14 @@ static int bad_inode_atomic_open(struct inode *inode, struct dentry *dentry,
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int bad_inode_tmpfile(struct mnt_idmap *idmap,
|
||||
static int bad_inode_tmpfile(const struct mnt_idmap *idmap,
|
||||
struct inode *inode, struct file *file,
|
||||
umode_t mode)
|
||||
{
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int bad_inode_set_acl(struct mnt_idmap *idmap,
|
||||
static int bad_inode_set_acl(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct posix_acl *acl,
|
||||
int type)
|
||||
{
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ int __btrfs_set_acl(struct btrfs_trans_handle *trans, struct inode *inode,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int btrfs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int btrfs_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type)
|
||||
{
|
||||
int ret;
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ struct mnt_idmap;
|
||||
struct dentry;
|
||||
|
||||
struct posix_acl *btrfs_get_acl(struct inode *inode, int type, bool rcu);
|
||||
int btrfs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int btrfs_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type);
|
||||
int __btrfs_set_acl(struct btrfs_trans_handle *trans, struct inode *inode,
|
||||
struct posix_acl *acl, int type);
|
||||
|
||||
@@ -559,7 +559,7 @@ int btrfs_new_inode_prepare(struct btrfs_new_inode_args *args,
|
||||
int btrfs_create_new_inode(struct btrfs_trans_handle *trans,
|
||||
struct btrfs_new_inode_args *args);
|
||||
void btrfs_new_inode_args_destroy(struct btrfs_new_inode_args *args);
|
||||
struct inode *btrfs_new_subvol_inode(struct mnt_idmap *idmap,
|
||||
struct inode *btrfs_new_subvol_inode(const struct mnt_idmap *idmap,
|
||||
struct inode *dir);
|
||||
void btrfs_set_delalloc_extent(struct btrfs_inode *inode, struct extent_state *state,
|
||||
u32 bits);
|
||||
|
||||
+12
-12
@@ -5498,7 +5498,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int btrfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
static int btrfs_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
@@ -7023,7 +7023,7 @@ out_inode:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int btrfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int btrfs_mknod(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode, dev_t rdev)
|
||||
{
|
||||
struct inode *inode;
|
||||
@@ -7037,7 +7037,7 @@ static int btrfs_mknod(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;
|
||||
@@ -7134,7 +7134,7 @@ fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct dentry *btrfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *btrfs_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct inode *inode;
|
||||
@@ -8041,7 +8041,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct inode *btrfs_new_subvol_inode(struct mnt_idmap *idmap,
|
||||
struct inode *btrfs_new_subvol_inode(const struct mnt_idmap *idmap,
|
||||
struct inode *dir)
|
||||
{
|
||||
struct inode *inode;
|
||||
@@ -8243,7 +8243,7 @@ int __init btrfs_init_cachep(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int btrfs_getattr(struct mnt_idmap *idmap,
|
||||
static int btrfs_getattr(const struct mnt_idmap *idmap,
|
||||
const struct path *path, struct kstat *stat,
|
||||
u32 request_mask, unsigned int flags)
|
||||
{
|
||||
@@ -8559,7 +8559,7 @@ out_notrans:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct inode *new_whiteout_inode(struct mnt_idmap *idmap,
|
||||
static struct inode *new_whiteout_inode(const struct mnt_idmap *idmap,
|
||||
struct inode *dir)
|
||||
{
|
||||
struct inode *inode;
|
||||
@@ -8574,7 +8574,7 @@ static struct inode *new_whiteout_inode(struct mnt_idmap *idmap,
|
||||
return inode;
|
||||
}
|
||||
|
||||
static int btrfs_rename(struct mnt_idmap *idmap,
|
||||
static int btrfs_rename(const struct mnt_idmap *idmap,
|
||||
struct inode *old_dir, struct dentry *old_dentry,
|
||||
struct inode *new_dir, struct dentry *new_dentry,
|
||||
unsigned int flags)
|
||||
@@ -8854,7 +8854,7 @@ out_fscrypt_names:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int btrfs_rename2(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
static int btrfs_rename2(const struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
struct dentry *old_dentry, struct inode *new_dir,
|
||||
struct dentry *new_dentry, unsigned int flags)
|
||||
{
|
||||
@@ -9042,7 +9042,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int btrfs_symlink(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int btrfs_symlink(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, const char *symname)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info = inode_to_fs_info(dir);
|
||||
@@ -9394,7 +9394,7 @@ int btrfs_prealloc_file_range_trans(struct inode *inode,
|
||||
* we are marking them with IOP_FASTPERM_MAY_EXEC, allowing path lookup to
|
||||
* elide calls here.
|
||||
*/
|
||||
static int btrfs_permission(struct mnt_idmap *idmap,
|
||||
static int btrfs_permission(const struct mnt_idmap *idmap,
|
||||
struct inode *inode, int mask)
|
||||
{
|
||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
||||
@@ -9410,7 +9410,7 @@ static int btrfs_permission(struct mnt_idmap *idmap,
|
||||
return generic_permission(idmap, inode, mask);
|
||||
}
|
||||
|
||||
static int btrfs_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int btrfs_tmpfile(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct file *file, umode_t mode)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info = inode_to_fs_info(dir);
|
||||
|
||||
+8
-8
@@ -278,7 +278,7 @@ int btrfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int btrfs_fileattr_set(struct mnt_idmap *idmap,
|
||||
int btrfs_fileattr_set(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa)
|
||||
{
|
||||
struct btrfs_inode *inode = BTRFS_I(d_inode(dentry));
|
||||
@@ -549,7 +549,7 @@ static unsigned int create_subvol_num_items(const struct btrfs_qgroup_inherit *i
|
||||
return num_items;
|
||||
}
|
||||
|
||||
static noinline int create_subvol(struct mnt_idmap *idmap,
|
||||
static noinline int create_subvol(const struct mnt_idmap *idmap,
|
||||
struct inode *dir, struct dentry *dentry,
|
||||
struct btrfs_qgroup_inherit *inherit)
|
||||
{
|
||||
@@ -879,7 +879,7 @@ free_pending:
|
||||
* inside this filesystem so it's quite a bit simpler.
|
||||
*/
|
||||
static noinline int btrfs_mksubvol(struct dentry *parent,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct qstr *qname, struct btrfs_root *snap_src,
|
||||
bool readonly,
|
||||
struct btrfs_qgroup_inherit *inherit)
|
||||
@@ -926,7 +926,7 @@ out_dput:
|
||||
}
|
||||
|
||||
static noinline int btrfs_mksnapshot(struct dentry *parent,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct qstr *qname,
|
||||
struct btrfs_root *root,
|
||||
bool readonly,
|
||||
@@ -1164,7 +1164,7 @@ static noinline int __btrfs_ioctl_snap_create(struct file *file,
|
||||
{
|
||||
int ret;
|
||||
struct qstr qname = QSTR(name);
|
||||
struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
const struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
|
||||
if (!S_ISDIR(file_inode(file)->i_mode))
|
||||
return -ENOTDIR;
|
||||
@@ -1741,7 +1741,7 @@ static noinline int btrfs_search_path_in_tree(struct btrfs_root *root, u64 dirid
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int btrfs_search_path_in_tree_user(struct mnt_idmap *idmap,
|
||||
static int btrfs_search_path_in_tree_user(const struct mnt_idmap *idmap,
|
||||
struct inode *inode,
|
||||
struct btrfs_ioctl_ino_lookup_user_args *args)
|
||||
{
|
||||
@@ -2241,7 +2241,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
|
||||
struct btrfs_root *dest = NULL;
|
||||
struct btrfs_ioctl_vol_args AUTO_KFREE(vol_args);
|
||||
struct btrfs_ioctl_vol_args_v2 AUTO_KFREE(vol_args2);
|
||||
struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
const struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
char *subvol_name, *subvol_name_ptr = NULL;
|
||||
int ret = 0;
|
||||
bool destroy_parent = false;
|
||||
@@ -3901,7 +3901,7 @@ static long btrfs_ioctl_quota_rescan_wait(struct btrfs_fs_info *fs_info)
|
||||
}
|
||||
|
||||
static long _btrfs_ioctl_set_received_subvol(struct file *file,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct btrfs_ioctl_received_subvol_args *sa)
|
||||
{
|
||||
struct inode *inode = file_inode(file);
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ struct btrfs_ioctl_balance_args;
|
||||
long btrfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
|
||||
long btrfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
|
||||
int btrfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
|
||||
int btrfs_fileattr_set(struct mnt_idmap *idmap,
|
||||
int btrfs_fileattr_set(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa);
|
||||
int btrfs_ioctl_get_supported_features(void __user *arg);
|
||||
void btrfs_sync_inode_flags_to_i_flags(struct btrfs_inode *inode);
|
||||
|
||||
+3
-3
@@ -360,7 +360,7 @@ static int btrfs_xattr_handler_get(const struct xattr_handler *handler,
|
||||
}
|
||||
|
||||
static int btrfs_xattr_handler_set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *buffer,
|
||||
size_t size, int flags)
|
||||
@@ -402,7 +402,7 @@ static int btrfs_xattr_handler_get_security(const struct xattr_handler *handler,
|
||||
}
|
||||
|
||||
static int btrfs_xattr_handler_set_security(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused,
|
||||
struct inode *inode,
|
||||
const char *name,
|
||||
@@ -420,7 +420,7 @@ static int btrfs_xattr_handler_set_security(const struct xattr_handler *handler,
|
||||
}
|
||||
|
||||
static int btrfs_xattr_handler_set_prop(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ retry:
|
||||
return acl;
|
||||
}
|
||||
|
||||
int ceph_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int ceph_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
+5
-5
@@ -921,7 +921,7 @@ int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry)
|
||||
return PTR_ERR(result);
|
||||
}
|
||||
|
||||
static int ceph_mknod(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ceph_mknod(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode, dev_t rdev)
|
||||
{
|
||||
struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb);
|
||||
@@ -988,7 +988,7 @@ out:
|
||||
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);
|
||||
@@ -1032,7 +1032,7 @@ static int prep_encrypted_symlink_target(struct ceph_mds_request *req,
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ceph_symlink(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ceph_symlink(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, const char *dest)
|
||||
{
|
||||
struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb);
|
||||
@@ -1106,7 +1106,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct dentry *ceph_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *ceph_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb);
|
||||
@@ -1478,7 +1478,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int ceph_rename(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
static int ceph_rename(const struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
struct dentry *old_dentry, struct inode *new_dir,
|
||||
struct dentry *new_dentry, unsigned int flags)
|
||||
{
|
||||
|
||||
+1
-1
@@ -795,7 +795,7 @@ static int ceph_finish_async_create(struct inode *dir, struct inode *inode,
|
||||
int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||
struct file *file, unsigned flags, umode_t mode)
|
||||
{
|
||||
struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
const struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
struct ceph_fs_client *fsc = ceph_sb_to_fs_client(dir->i_sb);
|
||||
struct ceph_client *cl = fsc->client;
|
||||
struct ceph_mds_client *mdsc = fsc->mdsc;
|
||||
|
||||
+5
-5
@@ -2398,7 +2398,7 @@ static const char *ceph_encrypted_get_link(struct dentry *dentry,
|
||||
done);
|
||||
}
|
||||
|
||||
static int ceph_encrypted_symlink_getattr(struct mnt_idmap *idmap,
|
||||
static int ceph_encrypted_symlink_getattr(const struct mnt_idmap *idmap,
|
||||
const struct path *path,
|
||||
struct kstat *stat, u32 request_mask,
|
||||
unsigned int query_flags)
|
||||
@@ -2568,7 +2568,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int __ceph_setattr(struct mnt_idmap *idmap, struct inode *inode,
|
||||
int __ceph_setattr(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
struct iattr *attr, struct ceph_iattr *cia)
|
||||
{
|
||||
struct ceph_inode_info *ci = ceph_inode(inode);
|
||||
@@ -2921,7 +2921,7 @@ out:
|
||||
/*
|
||||
* setattr
|
||||
*/
|
||||
int ceph_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int ceph_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
@@ -3098,7 +3098,7 @@ out:
|
||||
* Check inode permissions. We verify we have a valid value for
|
||||
* the AUTH cap, then call the generic handler.
|
||||
*/
|
||||
int ceph_permission(struct mnt_idmap *idmap, struct inode *inode,
|
||||
int ceph_permission(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
int mask)
|
||||
{
|
||||
int err;
|
||||
@@ -3145,7 +3145,7 @@ static int statx_to_caps(u32 want, umode_t mode)
|
||||
* Get all the attributes. If we have sufficient caps for the requested attrs,
|
||||
* then we can avoid talking to the MDS at all.
|
||||
*/
|
||||
int ceph_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int ceph_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask, unsigned int flags)
|
||||
{
|
||||
struct inode *inode = d_inode(path->dentry);
|
||||
|
||||
@@ -375,7 +375,7 @@ struct ceph_mds_request {
|
||||
int r_fmode; /* file mode, if expecting cap */
|
||||
int r_request_release_offset;
|
||||
const struct cred *r_cred;
|
||||
struct mnt_idmap *r_mnt_idmap;
|
||||
const struct mnt_idmap *r_mnt_idmap;
|
||||
struct timespec64 r_stamp;
|
||||
|
||||
/* for choosing which mds to send this request to */
|
||||
|
||||
+5
-5
@@ -1166,18 +1166,18 @@ static inline int ceph_do_getattr(struct inode *inode, int mask, bool force)
|
||||
{
|
||||
return __ceph_do_getattr(inode, NULL, mask, force);
|
||||
}
|
||||
extern int ceph_permission(struct mnt_idmap *idmap,
|
||||
extern int ceph_permission(const struct mnt_idmap *idmap,
|
||||
struct inode *inode, int mask);
|
||||
|
||||
struct ceph_iattr {
|
||||
struct ceph_fscrypt_auth *fscrypt_auth;
|
||||
};
|
||||
|
||||
extern int __ceph_setattr(struct mnt_idmap *idmap, struct inode *inode,
|
||||
extern int __ceph_setattr(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
struct iattr *attr, struct ceph_iattr *cia);
|
||||
extern int ceph_setattr(struct mnt_idmap *idmap,
|
||||
extern int ceph_setattr(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct iattr *attr);
|
||||
extern int ceph_getattr(struct mnt_idmap *idmap,
|
||||
extern int ceph_getattr(const struct mnt_idmap *idmap,
|
||||
const struct path *path, struct kstat *stat,
|
||||
u32 request_mask, unsigned int flags);
|
||||
void ceph_inode_shutdown(struct inode *inode);
|
||||
@@ -1252,7 +1252,7 @@ void ceph_release_acl_sec_ctx(struct ceph_acl_sec_ctx *as_ctx);
|
||||
#ifdef CONFIG_CEPH_FS_POSIX_ACL
|
||||
|
||||
struct posix_acl *ceph_get_acl(struct inode *, int, bool);
|
||||
int ceph_set_acl(struct mnt_idmap *idmap,
|
||||
int ceph_set_acl(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct posix_acl *acl, int type);
|
||||
int ceph_pre_init_acls(struct inode *dir, umode_t *mode,
|
||||
struct ceph_acl_sec_ctx *as_ctx);
|
||||
|
||||
+1
-1
@@ -1352,7 +1352,7 @@ static int ceph_get_xattr_handler(const struct xattr_handler *handler,
|
||||
}
|
||||
|
||||
static int ceph_set_xattr_handler(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
|
||||
@@ -46,12 +46,12 @@ extern const struct file_operations coda_ioctl_operations;
|
||||
/* operations shared over more than one file */
|
||||
int coda_open(struct inode *i, struct file *f);
|
||||
int coda_release(struct inode *i, struct file *f);
|
||||
int coda_permission(struct mnt_idmap *idmap, struct inode *inode,
|
||||
int coda_permission(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
int mask);
|
||||
int coda_revalidate_inode(struct inode *);
|
||||
int coda_getattr(struct mnt_idmap *, const struct path *, struct kstat *,
|
||||
int coda_getattr(const struct mnt_idmap *, const struct path *, struct kstat *,
|
||||
u32, unsigned int);
|
||||
int coda_setattr(struct mnt_idmap *, struct dentry *, struct iattr *);
|
||||
int coda_setattr(const struct mnt_idmap *, struct dentry *, struct iattr *);
|
||||
|
||||
/* this file: helpers */
|
||||
char *coda_f2s(struct CodaFid *f);
|
||||
|
||||
+5
-5
@@ -73,7 +73,7 @@ static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, unsig
|
||||
}
|
||||
|
||||
|
||||
int coda_permission(struct mnt_idmap *idmap, struct inode *inode,
|
||||
int coda_permission(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
int mask)
|
||||
{
|
||||
int error;
|
||||
@@ -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;
|
||||
@@ -166,7 +166,7 @@ err_out:
|
||||
return error;
|
||||
}
|
||||
|
||||
static struct dentry *coda_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *coda_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *de, umode_t mode)
|
||||
{
|
||||
struct inode *inode;
|
||||
@@ -233,7 +233,7 @@ static int coda_link(struct dentry *source_de, struct inode *dir_inode,
|
||||
}
|
||||
|
||||
|
||||
static int coda_symlink(struct mnt_idmap *idmap,
|
||||
static int coda_symlink(const struct mnt_idmap *idmap,
|
||||
struct inode *dir_inode, struct dentry *de,
|
||||
const char *symname)
|
||||
{
|
||||
@@ -300,7 +300,7 @@ static int coda_rmdir(struct inode *dir, struct dentry *de)
|
||||
}
|
||||
|
||||
/* rename */
|
||||
static int coda_rename(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
static int coda_rename(const struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
struct dentry *old_dentry, struct inode *new_dir,
|
||||
struct dentry *new_dentry, unsigned int flags)
|
||||
{
|
||||
|
||||
+2
-2
@@ -294,7 +294,7 @@ static void coda_evict_inode(struct inode *inode)
|
||||
coda_cache_clear_inode(inode);
|
||||
}
|
||||
|
||||
int coda_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int coda_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask, unsigned int flags)
|
||||
{
|
||||
int err = coda_revalidate_inode(d_inode(path->dentry));
|
||||
@@ -304,7 +304,7 @@ int coda_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
return err;
|
||||
}
|
||||
|
||||
int coda_setattr(struct mnt_idmap *idmap, struct dentry *de,
|
||||
int coda_setattr(const struct mnt_idmap *idmap, struct dentry *de,
|
||||
struct iattr *iattr)
|
||||
{
|
||||
struct inode *inode = d_inode(de);
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@
|
||||
#include "coda_linux.h"
|
||||
|
||||
/* pioctl ops */
|
||||
static int coda_ioctl_permission(struct mnt_idmap *idmap,
|
||||
static int coda_ioctl_permission(const struct mnt_idmap *idmap,
|
||||
struct inode *inode, int mask);
|
||||
static long coda_pioctl(struct file *filp, unsigned int cmd,
|
||||
unsigned long user_data);
|
||||
@@ -41,7 +41,7 @@ const struct file_operations coda_ioctl_operations = {
|
||||
};
|
||||
|
||||
/* the coda pioctl inode ops */
|
||||
static int coda_ioctl_permission(struct mnt_idmap *idmap,
|
||||
static int coda_ioctl_permission(const struct mnt_idmap *idmap,
|
||||
struct inode *inode, int mask)
|
||||
{
|
||||
return (mask & MAY_EXEC) ? -EACCES : 0;
|
||||
|
||||
@@ -76,7 +76,7 @@ extern int configfs_make_dirent(struct configfs_dirent *, struct dentry *,
|
||||
extern int configfs_dirent_is_ready(struct configfs_dirent *);
|
||||
|
||||
extern const unsigned char * configfs_get_name(struct configfs_dirent *sd);
|
||||
extern int configfs_setattr(struct mnt_idmap *idmap,
|
||||
extern int configfs_setattr(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct iattr *iattr);
|
||||
|
||||
extern struct dentry *configfs_pin_fs(void);
|
||||
@@ -90,7 +90,7 @@ extern const struct inode_operations configfs_root_inode_operations;
|
||||
extern const struct inode_operations configfs_symlink_inode_operations;
|
||||
extern const struct dentry_operations configfs_dentry_ops;
|
||||
|
||||
extern int configfs_symlink(struct mnt_idmap *idmap,
|
||||
extern int configfs_symlink(const struct mnt_idmap *idmap,
|
||||
struct inode *dir, struct dentry *dentry,
|
||||
const char *symname);
|
||||
extern int configfs_unlink(struct inode *dir, struct dentry *dentry);
|
||||
|
||||
+1
-1
@@ -1295,7 +1295,7 @@ out_root_unlock:
|
||||
}
|
||||
EXPORT_SYMBOL(configfs_depend_item_unlocked);
|
||||
|
||||
static struct dentry *configfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *configfs_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ static const struct inode_operations configfs_inode_operations ={
|
||||
.setattr = configfs_setattr,
|
||||
};
|
||||
|
||||
int configfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int configfs_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *iattr)
|
||||
{
|
||||
struct inode * inode = d_inode(dentry);
|
||||
|
||||
@@ -146,7 +146,7 @@ static int get_target(const char *symname, struct config_item **target,
|
||||
}
|
||||
|
||||
|
||||
int configfs_symlink(struct mnt_idmap *idmap, struct inode *dir,
|
||||
int configfs_symlink(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, const char *symname)
|
||||
{
|
||||
int ret;
|
||||
|
||||
+1
-1
@@ -974,7 +974,7 @@ static inline bool coredump_force_suid_safe(const struct coredump_params *cprm)
|
||||
static bool coredump_file(struct core_name *cn, struct coredump_params *cprm,
|
||||
const struct linux_binfmt *binfmt)
|
||||
{
|
||||
struct mnt_idmap *idmap;
|
||||
const struct mnt_idmap *idmap;
|
||||
struct inode *inode;
|
||||
struct file *file __free(fput) = NULL;
|
||||
int open_flags = O_CREAT | O_WRONLY | O_NOFOLLOW | O_LARGEFILE | O_EXCL;
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ static bool debugfs_enabled __ro_after_init = IS_ENABLED(CONFIG_DEBUG_FS_ALLOW_A
|
||||
* so that we can use the file mode as part of a heuristic to determine whether
|
||||
* to lock down individual files.
|
||||
*/
|
||||
static int debugfs_setattr(struct mnt_idmap *idmap,
|
||||
static int debugfs_setattr(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct iattr *ia)
|
||||
{
|
||||
int ret;
|
||||
|
||||
+13
-13
@@ -266,7 +266,7 @@ out:
|
||||
* 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)
|
||||
{
|
||||
@@ -462,7 +462,7 @@ static int ecryptfs_unlink(struct inode *dir, struct dentry *dentry)
|
||||
return ecryptfs_do_unlink(dir, dentry, d_inode(dentry));
|
||||
}
|
||||
|
||||
static int ecryptfs_symlink(struct mnt_idmap *idmap,
|
||||
static int ecryptfs_symlink(const struct mnt_idmap *idmap,
|
||||
struct inode *dir, struct dentry *dentry,
|
||||
const char *symname)
|
||||
{
|
||||
@@ -503,7 +503,7 @@ out_lock:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static struct dentry *ecryptfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *ecryptfs_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
int rc;
|
||||
@@ -562,7 +562,7 @@ static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry)
|
||||
}
|
||||
|
||||
static int
|
||||
ecryptfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
|
||||
ecryptfs_mknod(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode, dev_t dev)
|
||||
{
|
||||
int rc;
|
||||
@@ -590,7 +590,7 @@ out:
|
||||
}
|
||||
|
||||
static int
|
||||
ecryptfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
ecryptfs_rename(const struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
struct dentry *old_dentry, struct inode *new_dir,
|
||||
struct dentry *new_dentry, unsigned int flags)
|
||||
{
|
||||
@@ -849,7 +849,7 @@ int ecryptfs_truncate(struct dentry *dentry, loff_t new_length)
|
||||
}
|
||||
|
||||
static int
|
||||
ecryptfs_permission(struct mnt_idmap *idmap, struct inode *inode,
|
||||
ecryptfs_permission(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
int mask)
|
||||
{
|
||||
return inode_permission(&nop_mnt_idmap,
|
||||
@@ -869,7 +869,7 @@ ecryptfs_permission(struct mnt_idmap *idmap, struct inode *inode,
|
||||
* All other metadata changes will be passed right to the lower filesystem,
|
||||
* and we will just update our inode to look like the lower.
|
||||
*/
|
||||
static int ecryptfs_setattr(struct mnt_idmap *idmap,
|
||||
static int ecryptfs_setattr(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct iattr *ia)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
@@ -939,7 +939,7 @@ out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int ecryptfs_getattr_link(struct mnt_idmap *idmap,
|
||||
static int ecryptfs_getattr_link(const struct mnt_idmap *idmap,
|
||||
const struct path *path, struct kstat *stat,
|
||||
u32 request_mask, unsigned int flags)
|
||||
{
|
||||
@@ -965,7 +965,7 @@ static int ecryptfs_getattr_link(struct mnt_idmap *idmap,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int ecryptfs_getattr(struct mnt_idmap *idmap,
|
||||
static int ecryptfs_getattr(const struct mnt_idmap *idmap,
|
||||
const struct path *path, struct kstat *stat,
|
||||
u32 request_mask, unsigned int flags)
|
||||
{
|
||||
@@ -1078,7 +1078,7 @@ static int ecryptfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
|
||||
return vfs_fileattr_get(ecryptfs_dentry_to_lower(dentry), fa);
|
||||
}
|
||||
|
||||
static int ecryptfs_fileattr_set(struct mnt_idmap *idmap,
|
||||
static int ecryptfs_fileattr_set(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa)
|
||||
{
|
||||
struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
|
||||
@@ -1090,14 +1090,14 @@ static int ecryptfs_fileattr_set(struct mnt_idmap *idmap,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static struct posix_acl *ecryptfs_get_acl(struct mnt_idmap *idmap,
|
||||
static struct posix_acl *ecryptfs_get_acl(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, int type)
|
||||
{
|
||||
return vfs_get_acl(idmap, ecryptfs_dentry_to_lower(dentry),
|
||||
posix_acl_xattr_name(type));
|
||||
}
|
||||
|
||||
static int ecryptfs_set_acl(struct mnt_idmap *idmap,
|
||||
static int ecryptfs_set_acl(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct posix_acl *acl,
|
||||
int type)
|
||||
{
|
||||
@@ -1158,7 +1158,7 @@ static int ecryptfs_xattr_get(const struct xattr_handler *handler,
|
||||
}
|
||||
|
||||
static int ecryptfs_xattr_set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct inode *inode,
|
||||
const char *name, const void *value, size_t size,
|
||||
int flags)
|
||||
|
||||
+3
-3
@@ -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;
|
||||
@@ -150,7 +150,7 @@ efivarfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
|
||||
}
|
||||
|
||||
static int
|
||||
efivarfs_fileattr_set(struct mnt_idmap *idmap,
|
||||
efivarfs_fileattr_set(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa)
|
||||
{
|
||||
unsigned int i_flags = 0;
|
||||
@@ -170,7 +170,7 @@ efivarfs_fileattr_set(struct mnt_idmap *idmap,
|
||||
}
|
||||
|
||||
/* copy of simple_setattr except that it doesn't do i_size updates */
|
||||
static int efivarfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
static int efivarfs_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *iattr)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
+1
-1
@@ -311,7 +311,7 @@ struct inode *erofs_iget(struct super_block *sb, erofs_nid_t nid)
|
||||
return inode;
|
||||
}
|
||||
|
||||
int erofs_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int erofs_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask,
|
||||
unsigned int query_flags)
|
||||
{
|
||||
|
||||
+1
-1
@@ -417,7 +417,7 @@ void erofs_onlinefolio_init(struct folio *folio);
|
||||
void erofs_onlinefolio_split(struct folio *folio);
|
||||
void erofs_onlinefolio_end(struct folio *folio, int err, bool dirty);
|
||||
struct inode *erofs_iget(struct super_block *sb, erofs_nid_t nid);
|
||||
int erofs_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int erofs_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask,
|
||||
unsigned int query_flags);
|
||||
int erofs_namei(struct inode *dir, const struct qstr *name,
|
||||
|
||||
@@ -1362,7 +1362,7 @@ EXPORT_SYMBOL(begin_new_exec);
|
||||
void would_dump(struct linux_binprm *bprm, struct file *file)
|
||||
{
|
||||
struct inode *inode = file_inode(file);
|
||||
struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
const struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
if (inode_permission(idmap, inode, MAY_READ) < 0) {
|
||||
struct user_namespace *old, *user_ns;
|
||||
bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;
|
||||
@@ -1646,7 +1646,7 @@ static void check_unsafe_exec(struct linux_binprm *bprm)
|
||||
static void bprm_fill_uid(struct linux_binprm *bprm, struct file *file)
|
||||
{
|
||||
/* Handle suid and sgid on files */
|
||||
struct mnt_idmap *idmap;
|
||||
const struct mnt_idmap *idmap;
|
||||
struct inode *inode = file_inode(file);
|
||||
unsigned int mode;
|
||||
vfsuid_t vfsuid;
|
||||
|
||||
+2
-2
@@ -555,9 +555,9 @@ int exfat_trim_fs(struct inode *inode, struct fstrim_range *range);
|
||||
/* file.c */
|
||||
extern const struct file_operations exfat_file_operations;
|
||||
int __exfat_truncate(struct inode *inode);
|
||||
int exfat_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int exfat_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr);
|
||||
int exfat_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int exfat_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, unsigned int request_mask,
|
||||
unsigned int query_flags);
|
||||
struct file_kattr;
|
||||
|
||||
+3
-3
@@ -143,7 +143,7 @@ error:
|
||||
return err;
|
||||
}
|
||||
|
||||
static bool exfat_allow_set_time(struct mnt_idmap *idmap,
|
||||
static bool exfat_allow_set_time(const struct mnt_idmap *idmap,
|
||||
struct exfat_sb_info *sbi, struct inode *inode)
|
||||
{
|
||||
mode_t allow_utime = sbi->options.allow_utime;
|
||||
@@ -319,7 +319,7 @@ write_size:
|
||||
mutex_unlock(&sbi->s_lock);
|
||||
}
|
||||
|
||||
int exfat_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int exfat_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, unsigned int request_mask,
|
||||
unsigned int query_flags)
|
||||
{
|
||||
@@ -347,7 +347,7 @@ int exfat_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int exfat_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int exfat_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr)
|
||||
{
|
||||
struct exfat_sb_info *sbi = EXFAT_SB(dentry->d_sb);
|
||||
|
||||
+3
-3
@@ -552,7 +552,7 @@ out:
|
||||
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;
|
||||
@@ -825,7 +825,7 @@ unlock:
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct dentry *exfat_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *exfat_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct super_block *sb = dir->i_sb;
|
||||
@@ -1263,7 +1263,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int exfat_rename(struct mnt_idmap *idmap,
|
||||
static int exfat_rename(const struct mnt_idmap *idmap,
|
||||
struct inode *old_dir, struct dentry *old_dentry,
|
||||
struct inode *new_dir, struct dentry *new_dentry,
|
||||
unsigned int flags)
|
||||
|
||||
+1
-1
@@ -219,7 +219,7 @@ __ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
* inode->i_mutex: down
|
||||
*/
|
||||
int
|
||||
ext2_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
ext2_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type)
|
||||
{
|
||||
int error;
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ static inline int ext2_acl_count(size_t size)
|
||||
|
||||
/* acl.c */
|
||||
extern struct posix_acl *ext2_get_acl(struct inode *inode, int type, bool rcu);
|
||||
extern int ext2_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
extern int ext2_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type);
|
||||
extern int ext2_init_acl (struct inode *, struct inode *);
|
||||
|
||||
|
||||
+3
-3
@@ -739,8 +739,8 @@ extern int ext2_sync_inode_metadata(struct inode *, struct writeback_control *);
|
||||
extern void ext2_evict_inode(struct inode *);
|
||||
void ext2_write_failed(struct address_space *mapping, loff_t to);
|
||||
extern int ext2_get_block(struct inode *, sector_t, struct buffer_head *, int);
|
||||
extern int ext2_setattr (struct mnt_idmap *, struct dentry *, struct iattr *);
|
||||
extern int ext2_getattr (struct mnt_idmap *, const struct path *,
|
||||
extern int ext2_setattr (const struct mnt_idmap *, struct dentry *, struct iattr *);
|
||||
extern int ext2_getattr (const struct mnt_idmap *, const struct path *,
|
||||
struct kstat *, u32, unsigned int);
|
||||
extern void ext2_set_inode_flags(struct inode *inode);
|
||||
extern int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
|
||||
@@ -748,7 +748,7 @@ extern int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
|
||||
|
||||
/* ioctl.c */
|
||||
extern int ext2_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
|
||||
extern int ext2_fileattr_set(struct mnt_idmap *idmap,
|
||||
extern int ext2_fileattr_set(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa);
|
||||
extern long ext2_ioctl(struct file *, unsigned int, unsigned long);
|
||||
extern long ext2_compat_ioctl(struct file *, unsigned int, unsigned long);
|
||||
|
||||
+2
-2
@@ -1591,7 +1591,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
int ext2_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int ext2_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask, unsigned int query_flags)
|
||||
{
|
||||
struct inode *inode = d_inode(path->dentry);
|
||||
@@ -1617,7 +1617,7 @@ int ext2_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ext2_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int ext2_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *iattr)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ int ext2_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ext2_fileattr_set(struct mnt_idmap *idmap,
|
||||
int ext2_fileattr_set(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
+6
-6
@@ -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)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ static int ext2_create (struct mnt_idmap * idmap,
|
||||
return ext2_add_nondir(dentry, inode);
|
||||
}
|
||||
|
||||
static int ext2_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ext2_tmpfile(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct file *file, umode_t mode)
|
||||
{
|
||||
struct inode *inode = ext2_new_inode(dir, mode, NULL);
|
||||
@@ -131,7 +131,7 @@ static int ext2_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
return finish_open_simple(file, 0);
|
||||
}
|
||||
|
||||
static int ext2_mknod (struct mnt_idmap * idmap, struct inode * dir,
|
||||
static int ext2_mknod (const struct mnt_idmap * idmap, struct inode * dir,
|
||||
struct dentry *dentry, umode_t mode, dev_t rdev)
|
||||
{
|
||||
struct inode * inode;
|
||||
@@ -152,7 +152,7 @@ static int ext2_mknod (struct mnt_idmap * idmap, struct inode * dir,
|
||||
return err;
|
||||
}
|
||||
|
||||
static int ext2_symlink (struct mnt_idmap * idmap, struct inode * dir,
|
||||
static int ext2_symlink (const struct mnt_idmap * idmap, struct inode * dir,
|
||||
struct dentry * dentry, const char * symname)
|
||||
{
|
||||
struct super_block * sb = dir->i_sb;
|
||||
@@ -223,7 +223,7 @@ static int ext2_link (struct dentry * old_dentry, struct inode * dir,
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct dentry *ext2_mkdir(struct mnt_idmap * idmap,
|
||||
static struct dentry *ext2_mkdir(const struct mnt_idmap * idmap,
|
||||
struct inode * dir, struct dentry * dentry,
|
||||
umode_t mode)
|
||||
{
|
||||
@@ -316,7 +316,7 @@ static int ext2_rmdir (struct inode * dir, struct dentry *dentry)
|
||||
return err;
|
||||
}
|
||||
|
||||
static int ext2_rename (struct mnt_idmap * idmap,
|
||||
static int ext2_rename (const struct mnt_idmap * idmap,
|
||||
struct inode * old_dir, struct dentry * old_dentry,
|
||||
struct inode * new_dir, struct dentry * new_dentry,
|
||||
unsigned int flags)
|
||||
|
||||
@@ -19,7 +19,7 @@ ext2_xattr_security_get(const struct xattr_handler *handler,
|
||||
|
||||
static int
|
||||
ext2_xattr_security_set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
|
||||
@@ -26,7 +26,7 @@ ext2_xattr_trusted_get(const struct xattr_handler *handler,
|
||||
|
||||
static int
|
||||
ext2_xattr_trusted_set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
|
||||
@@ -30,7 +30,7 @@ ext2_xattr_user_get(const struct xattr_handler *handler,
|
||||
|
||||
static int
|
||||
ext2_xattr_user_set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
|
||||
+1
-1
@@ -225,7 +225,7 @@ __ext4_set_acl(handle_t *handle, struct inode *inode, int type,
|
||||
}
|
||||
|
||||
int
|
||||
ext4_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
ext4_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type)
|
||||
{
|
||||
handle_t *handle;
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ static inline int ext4_acl_count(size_t size)
|
||||
|
||||
/* acl.c */
|
||||
struct posix_acl *ext4_get_acl(struct inode *inode, int type, bool rcu);
|
||||
int ext4_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int ext4_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type);
|
||||
extern int ext4_init_acl(handle_t *, struct inode *, struct inode *);
|
||||
|
||||
|
||||
+5
-5
@@ -3046,7 +3046,7 @@ extern int ext4fs_dirhash(const struct inode *dir, const char *name, int len,
|
||||
|
||||
/* ialloc.c */
|
||||
extern int ext4_mark_inode_used(struct super_block *sb, int ino);
|
||||
extern struct inode *__ext4_new_inode(struct mnt_idmap *, handle_t *,
|
||||
extern struct inode *__ext4_new_inode(const struct mnt_idmap *, handle_t *,
|
||||
struct inode *, umode_t,
|
||||
const struct qstr *qstr, __u32 goal,
|
||||
uid_t *owner, __u32 i_flags,
|
||||
@@ -3181,14 +3181,14 @@ extern struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,
|
||||
|
||||
extern int ext4_write_inode(struct inode *, struct writeback_control *);
|
||||
extern int ext4_sync_inode_metadata(struct inode *, struct writeback_control *);
|
||||
extern int ext4_setattr(struct mnt_idmap *, struct dentry *,
|
||||
extern int ext4_setattr(const struct mnt_idmap *, struct dentry *,
|
||||
struct iattr *);
|
||||
extern u32 ext4_dio_alignment(struct inode *inode);
|
||||
extern int ext4_getattr(struct mnt_idmap *, const struct path *,
|
||||
extern int ext4_getattr(const struct mnt_idmap *, const struct path *,
|
||||
struct kstat *, u32, unsigned int);
|
||||
extern void ext4_evict_inode(struct inode *);
|
||||
extern void ext4_clear_inode(struct inode *);
|
||||
extern int ext4_file_getattr(struct mnt_idmap *, const struct path *,
|
||||
extern int ext4_file_getattr(const struct mnt_idmap *, const struct path *,
|
||||
struct kstat *, u32, unsigned int);
|
||||
extern void ext4_dirty_inode(struct inode *, int);
|
||||
extern int ext4_change_inode_journal_flag(struct inode *, int);
|
||||
@@ -3248,7 +3248,7 @@ extern int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
|
||||
/* ioctl.c */
|
||||
extern long ext4_ioctl(struct file *, unsigned int, unsigned long);
|
||||
extern long ext4_compat_ioctl(struct file *, unsigned int, unsigned long);
|
||||
int ext4_fileattr_set(struct mnt_idmap *idmap,
|
||||
int ext4_fileattr_set(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa);
|
||||
int ext4_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
|
||||
extern void ext4_reset_inode_seed(struct inode *inode);
|
||||
|
||||
+1
-1
@@ -930,7 +930,7 @@ static int ext4_xattr_credits_for_new_inode(struct inode *dir, mode_t mode,
|
||||
* For other inodes, search forward from the parent directory's block
|
||||
* group to find a free inode.
|
||||
*/
|
||||
struct inode *__ext4_new_inode(struct mnt_idmap *idmap,
|
||||
struct inode *__ext4_new_inode(const struct mnt_idmap *idmap,
|
||||
handle_t *handle, struct inode *dir,
|
||||
umode_t mode, const struct qstr *qstr,
|
||||
__u32 goal, uid_t *owner, __u32 i_flags,
|
||||
|
||||
+3
-3
@@ -6006,7 +6006,7 @@ static void ext4_wait_for_tail_page_commit(struct inode *inode)
|
||||
*
|
||||
* Called with inode->i_rwsem down.
|
||||
*/
|
||||
int ext4_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int ext4_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
@@ -6263,7 +6263,7 @@ u32 ext4_dio_alignment(struct inode *inode)
|
||||
return 1; /* use the iomap defaults */
|
||||
}
|
||||
|
||||
int ext4_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int ext4_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask, unsigned int query_flags)
|
||||
{
|
||||
struct inode *inode = d_inode(path->dentry);
|
||||
@@ -6332,7 +6332,7 @@ int ext4_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ext4_file_getattr(struct mnt_idmap *idmap,
|
||||
int ext4_file_getattr(const struct mnt_idmap *idmap,
|
||||
const struct path *path, struct kstat *stat,
|
||||
u32 request_mask, unsigned int query_flags)
|
||||
{
|
||||
|
||||
+3
-3
@@ -373,7 +373,7 @@ void ext4_reset_inode_seed(struct inode *inode)
|
||||
*
|
||||
*/
|
||||
static long swap_inode_boot_loader(struct super_block *sb,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct inode *inode)
|
||||
{
|
||||
handle_t *handle;
|
||||
@@ -1008,7 +1008,7 @@ int ext4_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ext4_fileattr_set(struct mnt_idmap *idmap,
|
||||
int ext4_fileattr_set(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
@@ -1539,7 +1539,7 @@ static long __ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct super_block *sb = inode->i_sb;
|
||||
struct mnt_idmap *idmap = file_mnt_idmap(filp);
|
||||
const struct mnt_idmap *idmap = file_mnt_idmap(filp);
|
||||
|
||||
ext4_debug("cmd = %u, arg = %lu\n", cmd, arg);
|
||||
|
||||
|
||||
+8
-8
@@ -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;
|
||||
@@ -2847,7 +2847,7 @@ retry:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int ext4_mknod(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ext4_mknod(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode, dev_t rdev)
|
||||
{
|
||||
handle_t *handle;
|
||||
@@ -2881,7 +2881,7 @@ retry:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int ext4_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ext4_tmpfile(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct file *file, umode_t mode)
|
||||
{
|
||||
handle_t *handle;
|
||||
@@ -2994,7 +2994,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct dentry *ext4_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *ext4_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
handle_t *handle;
|
||||
@@ -3360,7 +3360,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int ext4_symlink(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int ext4_symlink(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, const char *symname)
|
||||
{
|
||||
handle_t *handle;
|
||||
@@ -3753,7 +3753,7 @@ static void ext4_update_dir_count(handle_t *handle, struct ext4_renament *ent)
|
||||
}
|
||||
}
|
||||
|
||||
static struct inode *ext4_whiteout_for_rename(struct mnt_idmap *idmap,
|
||||
static struct inode *ext4_whiteout_for_rename(const struct mnt_idmap *idmap,
|
||||
struct ext4_renament *ent,
|
||||
int credits, handle_t **h)
|
||||
{
|
||||
@@ -3796,7 +3796,7 @@ retry:
|
||||
* while new_{dentry,inode) refers to the destination dentry/inode
|
||||
* This comes from rename(const char *oldpath, const char *newpath)
|
||||
*/
|
||||
static int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
static int ext4_rename(const struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
struct dentry *old_dentry, struct inode *new_dir,
|
||||
struct dentry *new_dentry, unsigned int flags)
|
||||
{
|
||||
@@ -4191,7 +4191,7 @@ end_rename:
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int ext4_rename2(struct mnt_idmap *idmap,
|
||||
static int ext4_rename2(const struct mnt_idmap *idmap,
|
||||
struct inode *old_dir, struct dentry *old_dentry,
|
||||
struct inode *new_dir, struct dentry *new_dentry,
|
||||
unsigned int flags)
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ static const char *ext4_encrypted_get_link(struct dentry *dentry,
|
||||
return paddr;
|
||||
}
|
||||
|
||||
static int ext4_encrypted_symlink_getattr(struct mnt_idmap *idmap,
|
||||
static int ext4_encrypted_symlink_getattr(const struct mnt_idmap *idmap,
|
||||
const struct path *path,
|
||||
struct kstat *stat, u32 request_mask,
|
||||
unsigned int query_flags)
|
||||
|
||||
@@ -32,7 +32,7 @@ ext4_xattr_hurd_get(const struct xattr_handler *handler,
|
||||
|
||||
static int
|
||||
ext4_xattr_hurd_set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
|
||||
@@ -23,7 +23,7 @@ ext4_xattr_security_get(const struct xattr_handler *handler,
|
||||
|
||||
static int
|
||||
ext4_xattr_security_set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
|
||||
@@ -30,7 +30,7 @@ ext4_xattr_trusted_get(const struct xattr_handler *handler,
|
||||
|
||||
static int
|
||||
ext4_xattr_trusted_set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
|
||||
@@ -31,7 +31,7 @@ ext4_xattr_user_get(const struct xattr_handler *handler,
|
||||
|
||||
static int
|
||||
ext4_xattr_user_set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
|
||||
+3
-3
@@ -219,7 +219,7 @@ struct posix_acl *f2fs_get_acl(struct inode *inode, int type, bool rcu)
|
||||
return __f2fs_get_acl(inode, type, NULL);
|
||||
}
|
||||
|
||||
static int f2fs_acl_update_mode(struct mnt_idmap *idmap,
|
||||
static int f2fs_acl_update_mode(const struct mnt_idmap *idmap,
|
||||
struct inode *inode, umode_t *mode_p,
|
||||
struct posix_acl **acl)
|
||||
{
|
||||
@@ -240,7 +240,7 @@ static int f2fs_acl_update_mode(struct mnt_idmap *idmap,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __f2fs_set_acl(struct mnt_idmap *idmap,
|
||||
static int __f2fs_set_acl(const struct mnt_idmap *idmap,
|
||||
struct inode *inode, int type,
|
||||
struct posix_acl *acl, struct folio *ifolio)
|
||||
{
|
||||
@@ -289,7 +289,7 @@ static int __f2fs_set_acl(struct mnt_idmap *idmap,
|
||||
return error;
|
||||
}
|
||||
|
||||
int f2fs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int f2fs_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ struct f2fs_acl_header {
|
||||
#ifdef CONFIG_F2FS_FS_POSIX_ACL
|
||||
|
||||
struct posix_acl *f2fs_get_acl(struct inode *, int, bool);
|
||||
int f2fs_set_acl(struct mnt_idmap *, struct dentry *,
|
||||
int f2fs_set_acl(const struct mnt_idmap *, struct dentry *,
|
||||
struct posix_acl *, int);
|
||||
int f2fs_init_acl(struct inode *, struct inode *, struct folio *ifolio,
|
||||
struct folio *dfolio);
|
||||
|
||||
+4
-4
@@ -3848,9 +3848,9 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync);
|
||||
int f2fs_do_truncate_blocks(struct inode *inode, u64 from, bool lock);
|
||||
int f2fs_truncate_blocks(struct inode *inode, u64 from, bool lock);
|
||||
int f2fs_truncate(struct inode *inode);
|
||||
int f2fs_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int f2fs_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask, unsigned int flags);
|
||||
int f2fs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int f2fs_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr);
|
||||
int f2fs_truncate_hole(struct inode *inode, pgoff_t pg_start, pgoff_t pg_end);
|
||||
void f2fs_truncate_data_blocks_range(struct dnode_of_data *dn, int count);
|
||||
@@ -3858,7 +3858,7 @@ int f2fs_do_shutdown(struct f2fs_sb_info *sbi, unsigned int flag,
|
||||
bool readonly, bool need_lock);
|
||||
int f2fs_precache_extents(struct inode *inode);
|
||||
int f2fs_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
|
||||
int f2fs_fileattr_set(struct mnt_idmap *idmap,
|
||||
int f2fs_fileattr_set(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa);
|
||||
long f2fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
|
||||
long f2fs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
|
||||
@@ -3890,7 +3890,7 @@ void f2fs_destroy_evict_inode_work(void);
|
||||
int f2fs_update_extension_list(struct f2fs_sb_info *sbi, const char *name,
|
||||
bool hot, bool set);
|
||||
struct dentry *f2fs_get_parent(struct dentry *child);
|
||||
int f2fs_get_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
int f2fs_get_tmpfile(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct inode **new_inode);
|
||||
|
||||
/*
|
||||
|
||||
+7
-7
@@ -1032,7 +1032,7 @@ static bool f2fs_force_buffered_io(struct inode *inode, int rw)
|
||||
return false;
|
||||
}
|
||||
|
||||
int f2fs_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int f2fs_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask, unsigned int query_flags)
|
||||
{
|
||||
struct inode *inode = d_inode(path->dentry);
|
||||
@@ -1096,7 +1096,7 @@ int f2fs_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_F2FS_FS_POSIX_ACL
|
||||
static void __setattr_copy(struct mnt_idmap *idmap,
|
||||
static void __setattr_copy(const struct mnt_idmap *idmap,
|
||||
struct inode *inode, const struct iattr *attr)
|
||||
{
|
||||
unsigned int ia_valid = attr->ia_valid;
|
||||
@@ -1121,7 +1121,7 @@ static void __setattr_copy(struct mnt_idmap *idmap,
|
||||
#define __setattr_copy setattr_copy
|
||||
#endif
|
||||
|
||||
int f2fs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int f2fs_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
@@ -2361,7 +2361,7 @@ static int f2fs_ioc_getversion(struct file *filp, unsigned long arg)
|
||||
static int f2fs_ioc_start_atomic_write(struct file *filp, bool truncate)
|
||||
{
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct mnt_idmap *idmap = file_mnt_idmap(filp);
|
||||
const struct mnt_idmap *idmap = file_mnt_idmap(filp);
|
||||
struct f2fs_inode_info *fi = F2FS_I(inode);
|
||||
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
|
||||
loff_t isize;
|
||||
@@ -2473,7 +2473,7 @@ out:
|
||||
static int f2fs_ioc_commit_atomic_write(struct file *filp)
|
||||
{
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct mnt_idmap *idmap = file_mnt_idmap(filp);
|
||||
const struct mnt_idmap *idmap = file_mnt_idmap(filp);
|
||||
int ret;
|
||||
|
||||
if (!(filp->f_mode & FMODE_WRITE))
|
||||
@@ -2508,7 +2508,7 @@ static int f2fs_ioc_commit_atomic_write(struct file *filp)
|
||||
static int f2fs_ioc_abort_atomic_write(struct file *filp)
|
||||
{
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct mnt_idmap *idmap = file_mnt_idmap(filp);
|
||||
const struct mnt_idmap *idmap = file_mnt_idmap(filp);
|
||||
int ret;
|
||||
|
||||
if (!(filp->f_mode & FMODE_WRITE))
|
||||
@@ -3580,7 +3580,7 @@ int f2fs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int f2fs_fileattr_set(struct mnt_idmap *idmap,
|
||||
int f2fs_fileattr_set(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
+12
-12
@@ -231,7 +231,7 @@ static void set_file_temperature(struct f2fs_sb_info *sbi, struct inode *inode,
|
||||
file_set_hot(inode);
|
||||
}
|
||||
|
||||
static struct inode *f2fs_new_inode(struct mnt_idmap *idmap,
|
||||
static struct inode *f2fs_new_inode(const struct mnt_idmap *idmap,
|
||||
struct inode *dir, umode_t mode,
|
||||
const char *name)
|
||||
{
|
||||
@@ -365,7 +365,7 @@ fail_drop:
|
||||
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);
|
||||
@@ -662,7 +662,7 @@ static const char *f2fs_get_link(struct dentry *dentry,
|
||||
return link;
|
||||
}
|
||||
|
||||
static int f2fs_symlink(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int f2fs_symlink(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, const char *symname)
|
||||
{
|
||||
struct f2fs_sb_info *sbi = F2FS_I_SB(dir);
|
||||
@@ -751,7 +751,7 @@ free_inode:
|
||||
goto out;
|
||||
}
|
||||
|
||||
static struct dentry *f2fs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *f2fs_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct f2fs_sb_info *sbi = F2FS_I_SB(dir);
|
||||
@@ -810,7 +810,7 @@ static int f2fs_rmdir(struct inode *dir, struct dentry *dentry)
|
||||
return -ENOTEMPTY;
|
||||
}
|
||||
|
||||
static int f2fs_mknod(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int f2fs_mknod(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode, dev_t rdev)
|
||||
{
|
||||
struct f2fs_sb_info *sbi = F2FS_I_SB(dir);
|
||||
@@ -857,7 +857,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int __f2fs_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int __f2fs_tmpfile(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct file *file, umode_t mode, bool is_whiteout,
|
||||
struct inode **new_inode, struct f2fs_filename *fname)
|
||||
{
|
||||
@@ -928,7 +928,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int f2fs_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int f2fs_tmpfile(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct file *file, umode_t mode)
|
||||
{
|
||||
struct f2fs_sb_info *sbi = F2FS_I_SB(dir);
|
||||
@@ -944,7 +944,7 @@ static int f2fs_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
return finish_open_simple(file, err);
|
||||
}
|
||||
|
||||
static int f2fs_create_whiteout(struct mnt_idmap *idmap,
|
||||
static int f2fs_create_whiteout(const struct mnt_idmap *idmap,
|
||||
struct inode *dir, struct inode **whiteout,
|
||||
struct f2fs_filename *fname)
|
||||
{
|
||||
@@ -952,14 +952,14 @@ static int f2fs_create_whiteout(struct mnt_idmap *idmap,
|
||||
true, whiteout, fname);
|
||||
}
|
||||
|
||||
int f2fs_get_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
int f2fs_get_tmpfile(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct inode **new_inode)
|
||||
{
|
||||
return __f2fs_tmpfile(idmap, dir, NULL, S_IFREG,
|
||||
false, new_inode, NULL);
|
||||
}
|
||||
|
||||
static int f2fs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
static int f2fs_rename(const struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
struct dentry *old_dentry, struct inode *new_dir,
|
||||
struct dentry *new_dentry, unsigned int flags)
|
||||
{
|
||||
@@ -1341,7 +1341,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int f2fs_rename2(struct mnt_idmap *idmap,
|
||||
static int f2fs_rename2(const struct mnt_idmap *idmap,
|
||||
struct inode *old_dir, struct dentry *old_dentry,
|
||||
struct inode *new_dir, struct dentry *new_dentry,
|
||||
unsigned int flags)
|
||||
@@ -1394,7 +1394,7 @@ static const char *f2fs_encrypted_get_link(struct dentry *dentry,
|
||||
return target;
|
||||
}
|
||||
|
||||
static int f2fs_encrypted_symlink_getattr(struct mnt_idmap *idmap,
|
||||
static int f2fs_encrypted_symlink_getattr(const struct mnt_idmap *idmap,
|
||||
const struct path *path,
|
||||
struct kstat *stat, u32 request_mask,
|
||||
unsigned int query_flags)
|
||||
|
||||
+2
-2
@@ -67,7 +67,7 @@ static int f2fs_xattr_generic_get(const struct xattr_handler *handler,
|
||||
}
|
||||
|
||||
static int f2fs_xattr_generic_set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
@@ -111,7 +111,7 @@ static int f2fs_xattr_advise_get(const struct xattr_handler *handler,
|
||||
}
|
||||
|
||||
static int f2fs_xattr_advise_set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
const struct mnt_idmap *idmap,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ bool failfs_mnt(const struct vfsmount *mnt)
|
||||
return mnt->mnt_sb == failfs_root_path.mnt->mnt_sb;
|
||||
}
|
||||
|
||||
static int failfs_permission(struct mnt_idmap *idmap, struct inode *inode,
|
||||
static int failfs_permission(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
int mask)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
@@ -35,7 +35,7 @@ static struct dentry *failfs_lookup(struct inode *dir, struct dentry *dentry,
|
||||
return ERR_PTR(-EOPNOTSUPP);
|
||||
}
|
||||
|
||||
static int failfs_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
static int failfs_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask,
|
||||
unsigned int query_flags)
|
||||
{
|
||||
|
||||
+2
-2
@@ -404,10 +404,10 @@ extern long fat_generic_ioctl(struct file *filp, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
extern const struct file_operations fat_file_operations;
|
||||
extern const struct inode_operations fat_file_inode_operations;
|
||||
extern int fat_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
extern int fat_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr);
|
||||
extern void fat_truncate_blocks(struct inode *inode, loff_t offset);
|
||||
extern int fat_getattr(struct mnt_idmap *idmap,
|
||||
extern int fat_getattr(const struct mnt_idmap *idmap,
|
||||
const struct path *path, struct kstat *stat,
|
||||
u32 request_mask, unsigned int flags);
|
||||
int fat_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
|
||||
|
||||
+3
-3
@@ -432,7 +432,7 @@ int fat_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fat_fileattr_get);
|
||||
|
||||
int fat_getattr(struct mnt_idmap *idmap, const struct path *path,
|
||||
int fat_getattr(const struct mnt_idmap *idmap, const struct path *path,
|
||||
struct kstat *stat, u32 request_mask, unsigned int flags)
|
||||
{
|
||||
struct inode *inode = d_inode(path->dentry);
|
||||
@@ -493,7 +493,7 @@ static int fat_sanitize_mode(const struct msdos_sb_info *sbi,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fat_allow_set_time(struct mnt_idmap *idmap,
|
||||
static int fat_allow_set_time(const struct mnt_idmap *idmap,
|
||||
struct msdos_sb_info *sbi, struct inode *inode)
|
||||
{
|
||||
umode_t allow_utime = sbi->options.allow_utime;
|
||||
@@ -514,7 +514,7 @@ static int fat_allow_set_time(struct mnt_idmap *idmap,
|
||||
/* valid file mode bits */
|
||||
#define FAT_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXUGO)
|
||||
|
||||
int fat_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int fat_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr)
|
||||
{
|
||||
struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb);
|
||||
|
||||
@@ -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;
|
||||
@@ -345,7 +345,7 @@ out:
|
||||
}
|
||||
|
||||
/***** Make a directory */
|
||||
static struct dentry *msdos_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *msdos_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct super_block *sb = dir->i_sb;
|
||||
@@ -600,7 +600,7 @@ error_inode:
|
||||
}
|
||||
|
||||
/***** Rename, a wrapper for rename_same_dir & rename_diff_dir */
|
||||
static int msdos_rename(struct mnt_idmap *idmap,
|
||||
static int msdos_rename(const struct mnt_idmap *idmap,
|
||||
struct inode *old_dir, struct dentry *old_dentry,
|
||||
struct inode *new_dir, struct dentry *new_dentry,
|
||||
unsigned int flags)
|
||||
|
||||
+3
-3
@@ -753,7 +753,7 @@ error:
|
||||
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;
|
||||
@@ -846,7 +846,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct dentry *vfat_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *vfat_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
{
|
||||
struct super_block *sb = dir->i_sb;
|
||||
@@ -1160,7 +1160,7 @@ error_exchange:
|
||||
goto out;
|
||||
}
|
||||
|
||||
static int vfat_rename2(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
static int vfat_rename2(const struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
struct dentry *old_dentry, struct inode *new_dir,
|
||||
struct dentry *new_dentry, unsigned int flags)
|
||||
{
|
||||
|
||||
+1
-1
@@ -201,7 +201,7 @@ static int vfs_dentry_acceptable(void *context, struct dentry *dentry)
|
||||
struct handle_to_path_ctx *ctx = context;
|
||||
struct user_namespace *user_ns = current_user_ns();
|
||||
struct dentry *d, *root = ctx->root.dentry;
|
||||
struct mnt_idmap *idmap = mnt_idmap(ctx->root.mnt);
|
||||
const struct mnt_idmap *idmap = mnt_idmap(ctx->root.mnt);
|
||||
int retval = 0;
|
||||
|
||||
if (!root)
|
||||
|
||||
+3
-3
@@ -265,7 +265,7 @@ static int fileattr_set_prepare(struct inode *inode,
|
||||
*
|
||||
* Return: 0 on success, or a negative error on failure.
|
||||
*/
|
||||
int vfs_fileattr_set(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int vfs_fileattr_set(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct file_kattr *fa)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
@@ -323,7 +323,7 @@ int ioctl_getflags(struct file *file, unsigned int __user *argp)
|
||||
|
||||
int ioctl_setflags(struct file *file, unsigned int __user *argp)
|
||||
{
|
||||
struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
const struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
struct dentry *dentry = file->f_path.dentry;
|
||||
struct file_kattr fa = {};
|
||||
unsigned int flags;
|
||||
@@ -355,7 +355,7 @@ int ioctl_fsgetxattr(struct file *file, void __user *argp)
|
||||
|
||||
int ioctl_fssetxattr(struct file *file, void __user *argp)
|
||||
{
|
||||
struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
const struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
struct dentry *dentry = file->f_path.dentry;
|
||||
struct file_kattr fa = {};
|
||||
int err;
|
||||
|
||||
+2
-2
@@ -62,7 +62,7 @@ static inline bool fuse_no_acl(const struct fuse_conn *fc,
|
||||
return !fc->posix_acl && (i_user_ns(inode) != &init_user_ns);
|
||||
}
|
||||
|
||||
struct posix_acl *fuse_get_acl(struct mnt_idmap *idmap,
|
||||
struct posix_acl *fuse_get_acl(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, int type)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
@@ -90,7 +90,7 @@ struct posix_acl *fuse_get_inode_acl(struct inode *inode, int type, bool rcu)
|
||||
return __fuse_get_acl(fc, inode, type, rcu);
|
||||
}
|
||||
|
||||
int fuse_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int fuse_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
+26
-25
@@ -751,7 +751,7 @@ static u32 fuse_ext_size(size_t size)
|
||||
/*
|
||||
* This adds just a single supplementary group that matches the parent's group.
|
||||
*/
|
||||
static int get_create_supp_group(struct mnt_idmap *idmap,
|
||||
static int get_create_supp_group(const struct mnt_idmap *idmap,
|
||||
struct inode *dir,
|
||||
struct fuse_in_arg *ext)
|
||||
{
|
||||
@@ -782,7 +782,7 @@ static int get_create_supp_group(struct mnt_idmap *idmap,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_create_ext(struct mnt_idmap *idmap,
|
||||
static int get_create_ext(const struct mnt_idmap *idmap,
|
||||
struct fuse_args *args,
|
||||
struct inode *dir, struct dentry *dentry,
|
||||
umode_t mode)
|
||||
@@ -820,7 +820,7 @@ static void free_ext_value(struct fuse_args *args)
|
||||
* If the filesystem doesn't support this, then fall back to separate
|
||||
* 'mknod' + 'open' requests.
|
||||
*/
|
||||
static int fuse_create_open(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int fuse_create_open(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *entry, struct file *file,
|
||||
unsigned int flags, umode_t mode, u32 opcode)
|
||||
{
|
||||
@@ -934,14 +934,14 @@ out_err:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int fuse_mknod(struct mnt_idmap *, struct inode *, struct dentry *,
|
||||
static int fuse_mknod(const struct mnt_idmap *, struct inode *, struct dentry *,
|
||||
umode_t, dev_t);
|
||||
static int fuse_atomic_open(struct inode *dir, struct dentry *entry,
|
||||
struct file *file, unsigned flags,
|
||||
umode_t mode)
|
||||
{
|
||||
int err;
|
||||
struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
const struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
struct fuse_conn *fc = get_fuse_conn(dir);
|
||||
|
||||
if (fuse_is_bad(dir))
|
||||
@@ -980,7 +980,7 @@ mknod:
|
||||
/*
|
||||
* Code shared between mknod, mkdir, symlink and link
|
||||
*/
|
||||
static struct dentry *create_new_entry(struct mnt_idmap *idmap, struct fuse_mount *fm,
|
||||
static struct dentry *create_new_entry(const struct mnt_idmap *idmap, struct fuse_mount *fm,
|
||||
struct fuse_args *args, struct inode *dir,
|
||||
struct dentry *entry, umode_t mode)
|
||||
{
|
||||
@@ -1053,7 +1053,7 @@ static struct dentry *create_new_entry(struct mnt_idmap *idmap, struct fuse_moun
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
static int create_new_nondir(struct mnt_idmap *idmap, struct fuse_mount *fm,
|
||||
static int create_new_nondir(const struct mnt_idmap *idmap, struct fuse_mount *fm,
|
||||
struct fuse_args *args, struct inode *dir,
|
||||
struct dentry *entry, umode_t mode)
|
||||
{
|
||||
@@ -1069,7 +1069,7 @@ static int create_new_nondir(struct mnt_idmap *idmap, struct fuse_mount *fm,
|
||||
return PTR_ERR(create_new_entry(idmap, fm, args, dir, entry, mode));
|
||||
}
|
||||
|
||||
static int fuse_mknod(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int fuse_mknod(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *entry, umode_t mode, dev_t rdev)
|
||||
{
|
||||
struct fuse_mknod_in inarg;
|
||||
@@ -1092,13 +1092,13 @@ static int fuse_mknod(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);
|
||||
}
|
||||
|
||||
static int fuse_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int fuse_tmpfile(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct file *file, umode_t mode)
|
||||
{
|
||||
struct fuse_conn *fc = get_fuse_conn(dir);
|
||||
@@ -1116,7 +1116,7 @@ static int fuse_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct dentry *fuse_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static struct dentry *fuse_mkdir(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *entry, umode_t mode)
|
||||
{
|
||||
struct fuse_mkdir_in inarg;
|
||||
@@ -1146,7 +1146,7 @@ static struct dentry *fuse_mkdir(struct mnt_idmap *idmap, struct inode *dir,
|
||||
return create_new_entry(idmap, fm, &args, dir, entry, S_IFDIR);
|
||||
}
|
||||
|
||||
static int fuse_symlink(struct mnt_idmap *idmap, struct inode *dir,
|
||||
static int fuse_symlink(const struct mnt_idmap *idmap, struct inode *dir,
|
||||
struct dentry *entry, const char *link)
|
||||
{
|
||||
struct fuse_mount *fm = get_fuse_mount(dir);
|
||||
@@ -1256,9 +1256,10 @@ static int fuse_rmdir(struct inode *dir, struct dentry *entry)
|
||||
return err;
|
||||
}
|
||||
|
||||
static int fuse_rename_common(struct mnt_idmap *idmap, struct inode *olddir, struct dentry *oldent,
|
||||
struct inode *newdir, struct dentry *newent,
|
||||
unsigned int flags, int opcode, size_t argsize)
|
||||
static int fuse_rename_common(const struct mnt_idmap *idmap, struct inode *olddir,
|
||||
struct dentry *oldent, struct inode *newdir,
|
||||
struct dentry *newent, unsigned int flags,
|
||||
int opcode, size_t argsize)
|
||||
{
|
||||
int err;
|
||||
struct fuse_rename2_in inarg;
|
||||
@@ -1306,7 +1307,7 @@ static int fuse_rename_common(struct mnt_idmap *idmap, struct inode *olddir, str
|
||||
return err;
|
||||
}
|
||||
|
||||
static int fuse_rename2(struct mnt_idmap *idmap, struct inode *olddir,
|
||||
static int fuse_rename2(const struct mnt_idmap *idmap, struct inode *olddir,
|
||||
struct dentry *oldent, struct inode *newdir,
|
||||
struct dentry *newent, unsigned int flags)
|
||||
{
|
||||
@@ -1375,7 +1376,7 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void fuse_fillattr(struct mnt_idmap *idmap, struct inode *inode,
|
||||
static void fuse_fillattr(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
struct fuse_attr *attr, struct kstat *stat)
|
||||
{
|
||||
unsigned int blkbits;
|
||||
@@ -1429,7 +1430,7 @@ static void fuse_statx_to_attr(struct fuse_statx *sx, struct fuse_attr *attr)
|
||||
attr->blksize = sx->blksize;
|
||||
}
|
||||
|
||||
static int fuse_do_statx(struct mnt_idmap *idmap, struct inode *inode,
|
||||
static int fuse_do_statx(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
struct file *file, struct kstat *stat)
|
||||
{
|
||||
int err;
|
||||
@@ -1490,7 +1491,7 @@ static int fuse_do_statx(struct mnt_idmap *idmap, struct inode *inode,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fuse_do_getattr(struct mnt_idmap *idmap, struct inode *inode,
|
||||
static int fuse_do_getattr(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
struct kstat *stat, struct file *file)
|
||||
{
|
||||
int err;
|
||||
@@ -1536,7 +1537,7 @@ static int fuse_do_getattr(struct mnt_idmap *idmap, struct inode *inode,
|
||||
return err;
|
||||
}
|
||||
|
||||
static int fuse_update_get_attr(struct mnt_idmap *idmap, struct inode *inode,
|
||||
static int fuse_update_get_attr(const struct mnt_idmap *idmap, struct inode *inode,
|
||||
struct file *file, struct kstat *stat,
|
||||
u32 request_mask, unsigned int flags)
|
||||
{
|
||||
@@ -1762,7 +1763,7 @@ static int fuse_perm_getattr(struct inode *inode, int mask)
|
||||
* access request is sent. Execute permission is still checked
|
||||
* locally based on file mode.
|
||||
*/
|
||||
static int fuse_permission(struct mnt_idmap *idmap,
|
||||
static int fuse_permission(const struct mnt_idmap *idmap,
|
||||
struct inode *inode, int mask)
|
||||
{
|
||||
struct fuse_conn *fc = get_fuse_conn(inode);
|
||||
@@ -2000,7 +2001,7 @@ static bool update_mtime(unsigned ivalid, bool trust_local_mtime)
|
||||
return true;
|
||||
}
|
||||
|
||||
static void iattr_to_fattr(struct mnt_idmap *idmap, struct fuse_conn *fc,
|
||||
static void iattr_to_fattr(const struct mnt_idmap *idmap, struct fuse_conn *fc,
|
||||
struct iattr *iattr, struct fuse_setattr_in *arg,
|
||||
bool trust_local_cmtime)
|
||||
{
|
||||
@@ -2142,7 +2143,7 @@ int fuse_flush_times(struct inode *inode, struct fuse_file *ff)
|
||||
* vmtruncate() doesn't allow for this case, so do the rlimit checking
|
||||
* and the actual truncation by hand.
|
||||
*/
|
||||
int fuse_do_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int fuse_do_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr, struct file *file)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
@@ -2323,7 +2324,7 @@ unlock:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int fuse_setattr(struct mnt_idmap *idmap, struct dentry *entry,
|
||||
static int fuse_setattr(const struct mnt_idmap *idmap, struct dentry *entry,
|
||||
struct iattr *attr)
|
||||
{
|
||||
struct inode *inode = d_inode(entry);
|
||||
@@ -2386,7 +2387,7 @@ static int fuse_setattr(struct mnt_idmap *idmap, struct dentry *entry,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int fuse_getattr(struct mnt_idmap *idmap,
|
||||
static int fuse_getattr(const struct mnt_idmap *idmap,
|
||||
const struct path *path, struct kstat *stat,
|
||||
u32 request_mask, unsigned int flags)
|
||||
{
|
||||
|
||||
+1
-1
@@ -1487,7 +1487,7 @@ static const struct iomap_write_ops fuse_iomap_write_ops = {
|
||||
static ssize_t fuse_cache_write_iter(struct kiocb *iocb, struct iov_iter *from)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
const struct mnt_idmap *idmap = file_mnt_idmap(file);
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
ssize_t written = 0;
|
||||
struct inode *inode = mapping->host;
|
||||
|
||||
+6
-6
@@ -1003,7 +1003,7 @@ void __exit fuse_ctl_cleanup(void);
|
||||
/*
|
||||
* Simple request sending that does request allocation and freeing
|
||||
*/
|
||||
ssize_t __fuse_simple_request(struct mnt_idmap *idmap,
|
||||
ssize_t __fuse_simple_request(const struct mnt_idmap *idmap,
|
||||
struct fuse_mount *fm,
|
||||
struct fuse_args *args);
|
||||
|
||||
@@ -1012,7 +1012,7 @@ static inline ssize_t fuse_simple_request(struct fuse_mount *fm, struct fuse_arg
|
||||
return __fuse_simple_request(&invalid_mnt_idmap, fm, args);
|
||||
}
|
||||
|
||||
static inline ssize_t fuse_simple_idmap_request(struct mnt_idmap *idmap,
|
||||
static inline ssize_t fuse_simple_idmap_request(const struct mnt_idmap *idmap,
|
||||
struct fuse_mount *fm,
|
||||
struct fuse_args *args)
|
||||
{
|
||||
@@ -1189,7 +1189,7 @@ bool fuse_write_update_attr(struct inode *inode, loff_t pos, ssize_t written);
|
||||
int fuse_flush_times(struct inode *inode, struct fuse_file *ff);
|
||||
int fuse_write_inode(struct inode *inode, struct writeback_control *wbc);
|
||||
|
||||
int fuse_do_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
int fuse_do_setattr(const struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct iattr *attr, struct file *file);
|
||||
|
||||
void fuse_unlock_inode(struct inode *inode, bool locked);
|
||||
@@ -1205,9 +1205,9 @@ extern const struct xattr_handler * const fuse_xattr_handlers[];
|
||||
|
||||
struct posix_acl;
|
||||
struct posix_acl *fuse_get_inode_acl(struct inode *inode, int type, bool rcu);
|
||||
struct posix_acl *fuse_get_acl(struct mnt_idmap *idmap,
|
||||
struct posix_acl *fuse_get_acl(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, int type);
|
||||
int fuse_set_acl(struct mnt_idmap *, struct dentry *dentry,
|
||||
int fuse_set_acl(const struct mnt_idmap *, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type);
|
||||
|
||||
/* readdir.c */
|
||||
@@ -1238,7 +1238,7 @@ long fuse_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
|
||||
long fuse_file_compat_ioctl(struct file *file, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
int fuse_fileattr_get(struct dentry *dentry, struct file_kattr *fa);
|
||||
int fuse_fileattr_set(struct mnt_idmap *idmap,
|
||||
int fuse_fileattr_set(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa);
|
||||
|
||||
/* iomode.c */
|
||||
|
||||
+1
-1
@@ -540,7 +540,7 @@ cleanup:
|
||||
return err;
|
||||
}
|
||||
|
||||
int fuse_fileattr_set(struct mnt_idmap *idmap,
|
||||
int fuse_fileattr_set(const struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct file_kattr *fa)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
+5
-3
@@ -3,7 +3,8 @@
|
||||
#include "dev.h"
|
||||
#include "fuse_i.h"
|
||||
|
||||
static int fuse_fill_creds(struct fuse_mount *fm, struct fuse_args *args, struct mnt_idmap *idmap)
|
||||
static int fuse_fill_creds(struct fuse_mount *fm, struct fuse_args *args,
|
||||
const struct mnt_idmap *idmap)
|
||||
{
|
||||
struct fuse_conn *fc = fm->fc;
|
||||
bool no_idmap = !fm->sb || (fm->sb->s_iflags & SB_I_NOIDMAP);
|
||||
@@ -49,7 +50,8 @@ static int fuse_fill_creds(struct fuse_mount *fm, struct fuse_args *args, struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fuse_req_prep(struct fuse_mount *fm, struct fuse_args *args, struct mnt_idmap *idmap)
|
||||
static int fuse_req_prep(struct fuse_mount *fm, struct fuse_args *args,
|
||||
const struct mnt_idmap *idmap)
|
||||
{
|
||||
if (!args->force && fm->fc->conn_error)
|
||||
return -ECONNREFUSED;
|
||||
@@ -57,7 +59,7 @@ static int fuse_req_prep(struct fuse_mount *fm, struct fuse_args *args, struct m
|
||||
return fuse_fill_creds(fm, args, idmap);
|
||||
}
|
||||
|
||||
ssize_t __fuse_simple_request(struct mnt_idmap *idmap, struct fuse_mount *fm,
|
||||
ssize_t __fuse_simple_request(const struct mnt_idmap *idmap, struct fuse_mount *fm,
|
||||
struct fuse_args *args)
|
||||
{
|
||||
struct fuse_conn *fc = fm->fc;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user