diff options
-rw-r--r-- | fs/namei.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c index 40ffb249aa7f..d38b17ad604c 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -581,6 +581,7 @@ static void __set_nameidata(struct nameidata *p, int dfd, struct filename *name) { struct nameidata *old = current->nameidata; p->stack = p->internal; + p->depth = 0; p->dfd = dfd; p->name = name; p->path.mnt = NULL; @@ -2320,7 +2321,6 @@ static const char *path_init(struct nameidata *nd, unsigned flags) nd->flags = flags; nd->state |= ND_JUMPED; - nd->depth = 0; nd->m_seq = __read_seqcount_begin(&mount_lock.seqcount); nd->r_seq = __read_seqcount_begin(&rename_lock.seqcount); |