diff options
-rw-r--r-- | fs/ext3/namei.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 79742d824a0a..60e44e6dd7a6 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c | |||
@@ -932,8 +932,16 @@ static struct buffer_head * ext3_dx_find_entry(struct dentry *dentry, | |||
932 | struct inode *dir = dentry->d_parent->d_inode; | 932 | struct inode *dir = dentry->d_parent->d_inode; |
933 | 933 | ||
934 | sb = dir->i_sb; | 934 | sb = dir->i_sb; |
935 | if (!(frame = dx_probe(dentry, NULL, &hinfo, frames, err))) | 935 | /* NFS may look up ".." - look at dx_root directory block */ |
936 | return NULL; | 936 | if (namelen > 2 || name[0] != '.'||(name[1] != '.' && name[1] != '\0')){ |
937 | if (!(frame = dx_probe(dentry, NULL, &hinfo, frames, err))) | ||
938 | return NULL; | ||
939 | } else { | ||
940 | frame = frames; | ||
941 | frame->bh = NULL; /* for dx_release() */ | ||
942 | frame->at = (struct dx_entry *)frames; /* hack for zero entry*/ | ||
943 | dx_set_block(frame->at, 0); /* dx_root block is 0 */ | ||
944 | } | ||
937 | hash = hinfo.hash; | 945 | hash = hinfo.hash; |
938 | do { | 946 | do { |
939 | block = dx_get_block(frame->at); | 947 | block = dx_get_block(frame->at); |