patch-2.1.127 linux/fs/hfs/dir_dbl.c
Next file: linux/fs/hfs/dir_nat.c
Previous file: linux/fs/hfs/dir_cap.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Mon Nov 2 09:35:16 1998
- Orig file:
v2.1.126/linux/fs/hfs/dir_dbl.c
- Orig date:
Wed Aug 26 11:37:41 1998
diff -u --recursive --new-file v2.1.126/linux/fs/hfs/dir_dbl.c linux/fs/hfs/dir_dbl.c
@@ -147,22 +147,12 @@
/* Perform name-mangling */
hfs_nameout(dir, &cname, dentry->d_name.name, dentry->d_name.len);
- /* Check for "." */
- if (hfs_streq(&cname, DOT)) {
- /* this little trick skips the iget and iput */
- d_add(dentry, dir);
- return 0;
- }
-
- /* Check for "..". */
- if (hfs_streq(&cname, DOT_DOT)) {
- inode = hfs_iget(hfs_cat_parent(entry), HFS_DBL_DIR, dentry);
- goto done;
- }
+ /* no need to check for "." or ".." */
/* Check for "%RootInfo" if in the root directory. */
if ((entry->cnid == htonl(HFS_ROOT_CNID)) &&
- hfs_streq(&cname, PCNT_ROOTINFO)) {
+ hfs_streq(cname.Name, cname.Len,
+ PCNT_ROOTINFO->Name, PCNT_ROOTINFO_LEN)) {
++entry->count; /* __hfs_iget() eats one */
inode = hfs_iget(entry, HFS_DBL_HDR, dentry);
goto done;
@@ -445,15 +435,15 @@
switch (type) {
case HFS_DBL_HDR:
/* given %name, look for name. i don't think this happens. */
- de = hfs_lookup_dentry(dentry->d_name.name + 1, dentry->d_name.len - 1,
- dentry->d_parent);
+ de = hfs_lookup_dentry(dentry->d_parent,
+ dentry->d_name.name + 1, dentry->d_name.len - 1);
break;
case HFS_DBL_DATA:
/* given name, look for %name */
tmp_name[0] = '%';
strncpy(tmp_name + 1, dentry->d_name.name, HFS_NAMELEN - 1);
- de = hfs_lookup_dentry(tmp_name, dentry->d_name.len + 1,
- dentry->d_parent);
+ de = hfs_lookup_dentry(dentry->d_parent,
+ tmp_name, dentry->d_name.len + 1);
}
if (de) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov