From: Aaro Koskinen Date: Wed, 15 Dec 2010 02:45:31 +0000 (-0500) Subject: ext4: fix typo which broke '..' detection in ext4_find_entry() X-Git-Tag: v3.0~2618^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d5c3aa84b3e431f2d0fc39c73c867d1a4dd8cff;p=platform%2Fkernel%2Flinux-amlogic.git 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 Signed-off-by: Aaro Koskinen Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 92203b8..dc40e75 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -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