Skip to content

Commit 8856954

Browse files
author
Al Viro
committed
ecryptfs: constify path
Reviewed-by: Christian Brauner (Microsoft) <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 20f45ad commit 8856954

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

fs/ecryptfs/ecryptfs_kernel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ ecryptfs_dentry_to_lower(struct dentry *dentry)
506506
return ((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path.dentry;
507507
}
508508

509-
static inline struct path *
509+
static inline const struct path *
510510
ecryptfs_dentry_to_lower_path(struct dentry *dentry)
511511
{
512512
return &((struct ecryptfs_dentry_info *)dentry->d_fsdata)->lower_path;

fs/ecryptfs/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb,
3333
struct iov_iter *to)
3434
{
3535
ssize_t rc;
36-
struct path *path;
36+
const struct path *path;
3737
struct file *file = iocb->ki_filp;
3838

3939
rc = generic_file_read_iter(iocb, to);

fs/ecryptfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ static int ecryptfs_i_size_read(struct dentry *dentry, struct inode *inode)
317317
static struct dentry *ecryptfs_lookup_interpose(struct dentry *dentry,
318318
struct dentry *lower_dentry)
319319
{
320-
struct path *path = ecryptfs_dentry_to_lower_path(dentry->d_parent);
320+
const struct path *path = ecryptfs_dentry_to_lower_path(dentry->d_parent);
321321
struct inode *inode, *lower_inode;
322322
struct ecryptfs_dentry_info *dentry_info;
323323
int rc = 0;

fs/ecryptfs/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static int ecryptfs_init_lower_file(struct dentry *dentry,
105105
struct file **lower_file)
106106
{
107107
const struct cred *cred = current_cred();
108-
struct path *path = ecryptfs_dentry_to_lower_path(dentry);
108+
const struct path *path = ecryptfs_dentry_to_lower_path(dentry);
109109
int rc;
110110

111111
rc = ecryptfs_privileged_open(lower_file, path->dentry, path->mnt,

0 commit comments

Comments
 (0)