diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c index 9732a1e17db3..3ea5e388ee16 100644 --- a/fs/afs/dynroot.c +++ b/fs/afs/dynroot.c @@ -213,6 +213,9 @@ static const char *afs_atcell_get_link(struct dentry *dentry, struct inode *inod if (!dentry) { /* We're in RCU-pathwalk. */ cell = rcu_dereference(net->ws_cell); + if (!cell) + return ERR_PTR(-ENOENT); + if (dotted) name = cell->name - 1; else