Isofs patch

Jan Kara (jack@atrey.karlin.mff.cuni.cz)
Fri, 25 Sep 1998 12:10:16 +0200


--0/AhcQY5QxfSsSZa
Content-Type: text/plain; charset=us-ascii

Hello.

I think I've found a small bug in isofs. When it is translating
the names (reading dir entry in isofs_find_dentry()) it writes
the translated name back into the buffer (doesn't mark it dirty,
just changes the data..). Usually it doesn't matter (although
it is a bit dirty) but if you are copying the image it matters.
So I've written a patch which should solve the problem (it was
quite easy because in most of modes the name is already translated
into allocated page...).

Goodbye Honza.

--0/AhcQY5QxfSsSZa
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="namei.diff"

--- namei.c.orig Wed Jun 24 23:30:10 1998
+++ namei.c Thu Sep 24 21:14:11 1998
@@ -162,7 +162,8 @@
dpnt = de->name;

if (dir->i_sb->u.isofs_sb.s_rock ||
- dir->i_sb->u.isofs_sb.s_joliet_level) {
+ dir->i_sb->u.isofs_sb.s_joliet_level ||
+ dir->i_sb->u.isofs_sb.s_mapping == 'n') {
if (! page) {
page = (unsigned char *)
__get_free_page(GFP_KERNEL);
@@ -191,10 +192,11 @@
break;
}
if (c == ';') c = '.';
- dpnt[i] = c;
+ page[i] = c;
}
/* This allows us to match with and without
* a trailing period. */
+ dpnt = page;
if(dpnt[dlen-1] == '.' && namelen == dlen-1)
dlen--;
}

--0/AhcQY5QxfSsSZa--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/