mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
fs: Constify path_is_under()'s arguments
The function path_is_under() doesn't modify the paths pointed by its arguments but only browse them. Constifying this pointers make a cleaner interface to be used by (future) code which may only have access to const struct path pointers (e.g. LSM hooks). Signed-off-by: Mickaël Salaün <[email protected]> Cc: Alexander Viro <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
e5517c2a5a
commit
640eb7e7b5
2 changed files with 2 additions and 2 deletions
|
|
@ -2997,7 +2997,7 @@ bool is_path_reachable(struct mount *mnt, struct dentry *dentry,
|
|||
return &mnt->mnt == root->mnt && is_subdir(dentry, root->dentry);
|
||||
}
|
||||
|
||||
bool path_is_under(struct path *path1, struct path *path2)
|
||||
bool path_is_under(const struct path *path1, const struct path *path2)
|
||||
{
|
||||
bool res;
|
||||
read_seqlock_excl(&mount_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue