diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-10-28 18:37:40 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-10-28 18:37:40 -0400 |
commit | f643ff550afbc82a2bc7026f4a6d64427e4fbc99 (patch) | |
tree | eaa69a0a05caae52b7a1919a4fecf9196ab3d02a /fs | |
parent | d1b72cc6d8cb766c802fdc70a5edc2f0ba8a2b57 (diff) | |
download | op-kernel-dev-f643ff550afbc82a2bc7026f4a6d64427e4fbc99.zip op-kernel-dev-f643ff550afbc82a2bc7026f4a6d64427e4fbc99.tar.gz |
isofs_cmp(): we'll never see a dentry for . or ..
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/isofs/namei.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c index 9529564..6f6dd0c 100644 --- a/fs/isofs/namei.c +++ b/fs/isofs/namei.c @@ -18,23 +18,6 @@ static int isofs_cmp(struct dentry *dentry, const char *compare, int dlen) { struct qstr qstr; - - if (!compare) - return 1; - - /* check special "." and ".." files */ - if (dlen == 1) { - /* "." */ - if (compare[0] == 0) { - if (!dentry->d_name.len) - return 0; - compare = "."; - } else if (compare[0] == 1) { - compare = ".."; - dlen = 2; - } - } - qstr.name = compare; qstr.len = dlen; return dentry->d_op->d_compare(NULL, NULL, dentry->d_name.len, dentry->d_name.name, &qstr); @@ -146,7 +129,8 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry, (!(de->flags[-sbi->s_high_sierra] & 1))) && (sbi->s_showassoc || (!(de->flags[-sbi->s_high_sierra] & 4)))) { - match = (isofs_cmp(dentry, dpnt, dlen) == 0); + if (dpnt && (dlen > 1 || dpnt[0] > 1)) + match = (isofs_cmp(dentry, dpnt, dlen) == 0); } if (match) { isofs_normalize_block_and_offset(de, |