diff -U 8 -r linux-2.6.25-rc3-git3/fs/romfs/inode.c linux/fs/romfs/inode.c --- linux-2.6.25-rc3-git3/fs/romfs/inode.c 2008-03-03 09:05:38.000000000 -0800 +++ linux/fs/romfs/inode.c 2008-03-03 09:06:03.000000000 -0800 @@ -342,16 +342,17 @@ unsigned long offset, maxoff; int fslen, res; struct inode *inode; char fsname[ROMFS_MAXFN]; /* XXX dynamic? */ struct romfs_inode ri; const char *name; /* got from dentry */ int len; + inode = NULL; res = -EACCES; /* placeholder for "no data here" */ offset = dir->i_ino & ROMFH_MASK; lock_kernel(); if (romfs_copyfrom(dir, &ri, offset, ROMFH_SIZE) <= 0) goto out; maxoff = romfs_maxsize(dir->i_sb); offset = be32_to_cpu(ri.spec) & ROMFH_MASK; @@ -404,17 +405,17 @@ * it's a bit funky, _lookup needs to return an error code * (negative) or a NULL, both as a dentry. ENOENT should not * be returned, instead we need to create a negative dentry by * d_add(dentry, NULL); and return 0 as no error. * (Although as I see, it only matters on writable file * systems). */ -out0: inode = NULL; +out0: res = 0; d_add (dentry, inode); out: unlock_kernel(); return ERR_PTR(res); } /*