From: Al Viro Date: Thu, 4 Aug 2022 17:19:18 +0000 (-0400) Subject: nd_jump_link(): constify path X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ea4af4aa03c3966c63231b4191da94497de8f034;p=linux.git nd_jump_link(): constify path Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro --- diff --git a/fs/namei.c b/fs/namei.c index 6a5ab1a6f01bf..8533087e5dac1 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -986,7 +986,7 @@ static int nd_jump_root(struct nameidata *nd) * Helper to directly jump to a known parsed path from ->get_link, * caller must have taken a reference to path beforehand. */ -int nd_jump_link(struct path *path) +int nd_jump_link(const struct path *path) { int error = -ELOOP; struct nameidata *nd = current->nameidata; diff --git a/include/linux/namei.h b/include/linux/namei.h index caeb08a98536c..00fee52df8423 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -83,7 +83,7 @@ extern int follow_up(struct path *); extern struct dentry *lock_rename(struct dentry *, struct dentry *); extern void unlock_rename(struct dentry *, struct dentry *); -extern int __must_check nd_jump_link(struct path *path); +extern int __must_check nd_jump_link(const struct path *path); static inline void nd_terminate_link(void *name, size_t len, size_t maxlen) {