Skip to content

Commit

Permalink
ext4: fix typo which broke '..' detection in ext4_find_entry()
Browse files Browse the repository at this point in the history
There should be a check for the NUL character instead of '0'.

Fortunately the only thing that cares about this is NFS serving, which
is why we didn't notice this in the merge window testing.

Reported-by: Phil Carmody <[email protected]>
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: "Theodore Ts'o" <[email protected]>
  • Loading branch information
aakoskin authored and tytso committed Dec 15, 2010
1 parent 1449032 commit 6d5c3aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
if (namelen > EXT4_NAME_LEN)
return NULL;
if ((namelen <= 2) && (name[0] == '.') &&
(name[1] == '.' || name[1] == '0')) {
(name[1] == '.' || name[1] == '\0')) {
/*
* "." or ".." will only be in the first block
* NFS may look up ".."; "." should be handled by the VFS
Expand Down

0 comments on commit 6d5c3aa

Please sign in to comment.