patch-2.1.43 linux/fs/isofs/namei.c
Next file: linux/fs/isofs/symlink.c
Previous file: linux/fs/isofs/inode.c
Back to the patch index
Back to the overall index
- Lines: 89
- Date:
Thu Jun 12 16:22:08 1997
- Orig file:
v2.1.42/linux/fs/isofs/namei.c
- Orig date:
Mon May 19 12:57:39 1997
diff -u --recursive --new-file v2.1.42/linux/fs/isofs/namei.c linux/fs/isofs/namei.c
@@ -206,6 +206,7 @@
{
unsigned long ino, ino_back;
struct buffer_head * bh;
+ char *lcname;
#ifdef DEBUG
printk("lookup: %x %d\n",dir->i_ino, len);
@@ -219,38 +220,29 @@
return -ENOENT;
}
- ino = 0;
-
- if (dcache_lookup(dir, name, len, &ino)) ino_back = dir->i_ino;
-
- if (!ino) {
- char *lcname;
-
- /* If mounted with check=relaxed (and most likely norock),
- then first convert this name to lower case. */
- if (dir->i_sb->u.isofs_sb.s_name_check == 'r'
- && (lcname = kmalloc(len, GFP_KERNEL)) != NULL) {
- int i;
- char c;
-
- for (i=0; i<len; i++) {
- c = name[i];
- if (c >= 'A' && c <= 'Z') c |= 0x20;
- lcname[i] = c;
- }
- bh = isofs_find_entry(dir,lcname,len, &ino, &ino_back);
- kfree(lcname);
- } else
- bh = isofs_find_entry(dir,name,len, &ino, &ino_back);
-
- if (!bh) {
- iput(dir);
- return -ENOENT;
+ /* If mounted with check=relaxed (and most likely norock),
+ * then first convert this name to lower case.
+ */
+ if (dir->i_sb->u.isofs_sb.s_name_check == 'r' &&
+ (lcname = kmalloc(len, GFP_KERNEL)) != NULL) {
+ int i;
+ char c;
+
+ for (i=0; i<len; i++) {
+ c = name[i];
+ if (c >= 'A' && c <= 'Z') c |= 0x20;
+ lcname[i] = c;
}
- if (ino_back == dir->i_ino)
- dcache_add(dir, name, len, ino);
- brelse(bh);
+ bh = isofs_find_entry(dir,lcname,len, &ino, &ino_back);
+ kfree(lcname);
+ } else
+ bh = isofs_find_entry(dir,name,len, &ino, &ino_back);
+
+ if (!bh) {
+ iput(dir);
+ return -ENOENT;
}
+ brelse(bh);
if (!(*result = iget(dir->i_sb,ino))) {
iput(dir);
@@ -258,14 +250,12 @@
}
/* We need this backlink for the ".." entry unless the name that we
- are looking up traversed a mount point (in which case the inode
- may not even be on an iso9660 filesystem, and writing to
- u.isofs_i would only cause memory corruption).
- */
-
- if (ino_back && !(*result)->i_pipe && (*result)->i_sb == dir->i_sb) {
- (*result)->u.isofs_i.i_backlink = ino_back;
- }
+ * are looking up traversed a mount point (in which case the inode
+ * may not even be on an iso9660 filesystem, and writing to
+ * u.isofs_i would only cause memory corruption).
+ */
+ if (ino_back && !(*result)->i_pipe && (*result)->i_sb == dir->i_sb)
+ (*result)->u.isofs_i.i_backlink = ino_back;
iput(dir);
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov