summaryrefslogtreecommitdiff
path: root/fs/squashfs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/squashfs/namei.c')
-rw-r--r--fs/squashfs/namei.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/squashfs/namei.c b/fs/squashfs/namei.c
index 0682b38d7e31..66c70fc8c80b 100644
--- a/fs/squashfs/namei.c
+++ b/fs/squashfs/namei.c
@@ -177,8 +177,7 @@ static struct dentry *squashfs_lookup(struct inode *dir, struct dentry *dentry,
dir_count = le32_to_cpu(dirh.count) + 1;
- /* dir_count should never be larger than 256 */
- if (dir_count > 256)
+ if (dir_count > SQUASHFS_DIR_COUNT)
goto data_error;
while (dir_count--) {