|
@@ -171,7 +171,7 @@ static int autofs4_getpath(struct autofs_sb_info *sbi,
|
|
for (tmp = dentry ; tmp != root ; tmp = tmp->d_parent)
|
|
for (tmp = dentry ; tmp != root ; tmp = tmp->d_parent)
|
|
len += tmp->d_name.len + 1;
|
|
len += tmp->d_name.len + 1;
|
|
|
|
|
|
- if (--len > NAME_MAX) {
|
|
|
|
|
|
+ if (!len || --len > NAME_MAX) {
|
|
spin_unlock(&dcache_lock);
|
|
spin_unlock(&dcache_lock);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|