diff --git a/fs/dcache.c b/fs/dcache.c index 93d9f4e1a8eddbafd18e83552a58c33e4157f4cf..0e4b5fa6c9f995c6bfdd60133463926ab25187df 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1889,7 +1889,7 @@ struct dentry *__d_lookup_rcu(const struct dentry *parent, * dentry is returned. The caller must use dput to free the entry when it has * finished using it. %NULL is returned if the dentry does not exist. */ -struct dentry *d_lookup(struct dentry *parent, struct qstr *name) +struct dentry *d_lookup(const struct dentry *parent, const struct qstr *name) { struct dentry *dentry; unsigned seq; diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 969086c0330103986f40209ebb12b9d5d810bcd2..03d1692884238ddda322c8adc911c2971a7af94d 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -293,7 +293,7 @@ extern void d_move(struct dentry *, struct dentry *); extern struct dentry *d_ancestor(struct dentry *, struct dentry *); /* appendix may either be NULL or be used for transname suffixes */ -extern struct dentry *d_lookup(struct dentry *, struct qstr *); +extern struct dentry *d_lookup(const struct dentry *, const struct qstr *); extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); extern struct dentry *__d_lookup(const struct dentry *, const struct qstr *); extern struct dentry *__d_lookup_rcu(const struct dentry *parent,