mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
backing_file_user_path(): constify struct path *
Callers never use the resulting pointer to modify the struct path it points to (nor should they). Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -54,7 +54,7 @@ struct backing_file {
|
||||
|
||||
#define backing_file(f) container_of(f, struct backing_file, file)
|
||||
|
||||
struct path *backing_file_user_path(const struct file *f)
|
||||
const struct path *backing_file_user_path(const struct file *f)
|
||||
{
|
||||
return &backing_file(f)->user_path;
|
||||
}
|
||||
|
||||
@@ -2879,7 +2879,7 @@ struct file *dentry_open_nonotify(const struct path *path, int flags,
|
||||
const struct cred *cred);
|
||||
struct file *dentry_create(const struct path *path, int flags, umode_t mode,
|
||||
const struct cred *cred);
|
||||
struct path *backing_file_user_path(const struct file *f);
|
||||
const struct path *backing_file_user_path(const struct file *f);
|
||||
|
||||
/*
|
||||
* When mmapping a file on a stackable filesystem (e.g., overlayfs), the file
|
||||
|
||||
Reference in New Issue
Block a user