Commit 4c0ed7d8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull vfs constification updates from Al Viro:
 "whack-a-mole: constifying struct path *"

* tag 'pull-path' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  ecryptfs: constify path
  spufs: constify path
  nd_jump_link(): constify path
  audit_init_parent(): constify path
  __io_setxattr(): constify path
  do_proc_readlink(): constify path
  overlayfs: constify path
  fs/notify: constify path
  may_linkat(): constify path
  do_sys_name_to_handle(): constify path
  ->getprocattr(): attribute name is const char *, TYVM...
parents 1586a703 88569546
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -275,7 +275,7 @@ spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags,
	return ret;
	return ret;
}
}


static int spufs_context_open(struct path *path)
static int spufs_context_open(const struct path *path)
{
{
	int ret;
	int ret;
	struct file *filp;
	struct file *filp;
@@ -491,7 +491,7 @@ spufs_mkgang(struct inode *dir, struct dentry *dentry, umode_t mode)
	return ret;
	return ret;
}
}


static int spufs_gang_open(struct path *path)
static int spufs_gang_open(const struct path *path)
{
{
	int ret;
	int ret;
	struct file *filp;
	struct file *filp;
@@ -536,7 +536,7 @@ static int spufs_create_gang(struct inode *inode,


static struct file_system_type spufs_type;
static struct file_system_type spufs_type;


long spufs_create(struct path *path, struct dentry *dentry,
long spufs_create(const struct path *path, struct dentry *dentry,
		unsigned int flags, umode_t mode, struct file *filp)
		unsigned int flags, umode_t mode, struct file *filp)
{
{
	struct inode *dir = d_inode(path->dentry);
	struct inode *dir = d_inode(path->dentry);
+1 −1
Original line number Original line Diff line number Diff line
@@ -232,7 +232,7 @@ extern const struct spufs_tree_descr spufs_dir_debug_contents[];
extern struct spufs_calls spufs_calls;
extern struct spufs_calls spufs_calls;
struct coredump_params;
struct coredump_params;
long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *status);
long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *status);
long spufs_create(struct path *nd, struct dentry *dentry, unsigned int flags,
long spufs_create(const struct path *nd, struct dentry *dentry, unsigned int flags,
			umode_t mode, struct file *filp);
			umode_t mode, struct file *filp);
/* ELF coredump callbacks for writing SPU ELF notes */
/* ELF coredump callbacks for writing SPU ELF notes */
extern int spufs_coredump_extra_notes_size(void);
extern int spufs_coredump_extra_notes_size(void);
+1 −1
Original line number Original line Diff line number Diff line
@@ -506,7 +506,7 @@ ecryptfs_dentry_to_lower(struct dentry *dentry)
	return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.dentry;
	return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.dentry;
}
}


static inline struct path *
static inline const struct path *
ecryptfs_dentry_to_lower_path(struct dentry *dentry)
ecryptfs_dentry_to_lower_path(struct dentry *dentry)
{
{
	return &((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path;
	return &((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path;
+1 −1
Original line number Original line Diff line number Diff line
@@ -33,7 +33,7 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb,
				struct iov_iter *to)
				struct iov_iter *to)
{
{
	ssize_t rc;
	ssize_t rc;
	struct path *path;
	const struct path *path;
	struct file *file = iocb->ki_filp;
	struct file *file = iocb->ki_filp;


	rc = generic_file_read_iter(iocb, to);
	rc = generic_file_read_iter(iocb, to);
+1 −1
Original line number Original line Diff line number Diff line
@@ -317,7 +317,7 @@ static int ecryptfs_i_size_read(struct dentry *dentry, struct inode *inode)
static struct dentry *ecryptfs_lookup_interpose(struct dentry *dentry,
static struct dentry *ecryptfs_lookup_interpose(struct dentry *dentry,
				     struct dentry *lower_dentry)
				     struct dentry *lower_dentry)
{
{
	struct path *path = ecryptfs_dentry_to_lower_path(dentry->d_parent);
	const struct path *path = ecryptfs_dentry_to_lower_path(dentry->d_parent);
	struct inode *inode, *lower_inode;
	struct inode *inode, *lower_inode;
	struct ecryptfs_dentry_info *dentry_info;
	struct ecryptfs_dentry_info *dentry_info;
	int rc = 0;
	int rc = 0;
Loading