mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
ext4: fix typo which broke '..' detection in ext4_find_entry()
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 <ext-phil.2.carmody@nokia.com> Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
1449032be1
commit
6d5c3aa84b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user