diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-12-06 23:51:34 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-12-06 23:51:34 +0000 |
commit | 230e5ab6a084ed50470f101934782dbf54b0d06b (patch) | |
tree | 5dd821c8d33f450470588e7a543f74bf74306e9e /fs/isofs/rock.c | |
parent | c9b1c8a64c6444d189856f1e26bdcb8b4cd0113a (diff) |
Merge with Linux 2.1.67.
Diffstat (limited to 'fs/isofs/rock.c')
-rw-r--r-- | fs/isofs/rock.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c index a9bb95f52..e006ac3ee 100644 --- a/fs/isofs/rock.c +++ b/fs/isofs/rock.c @@ -153,15 +153,16 @@ int find_rock_ridge_relocation(struct iso_directory_record * de, } int get_rock_ridge_filename(struct iso_directory_record * de, - char ** name, int * namlen, struct inode * inode) + char * retname, struct inode * inode) { int len; unsigned char * chr; CONTINUE_DECLS; - char * retname = NULL; int retnamlen = 0, truncate=0; if (!inode->i_sb->u.isofs_sb.s_rock) return 0; + *retname = 0; + retnamlen = 0; SETUP_ROCK_RIDGE(de, chr, len); repeat: @@ -203,18 +204,6 @@ int get_rock_ridge_filename(struct iso_directory_record * de, printk("Unsupported NM flag settings (%d)\n",rr->u.NM.flags); break; }; - if (!retname){ - retname = (char *) kmalloc (255,GFP_KERNEL); - /* This may be a waste, but we only - need this for a moment. The layers - that call this function should - deallocate the mem fairly soon - after control is returned */ - - if (!retname) goto out; - *retname = 0; /* Zero length string */ - retnamlen = 0; - }; if((strlen(retname) + rr->len - 5) >= 254) { truncate = 1; break; @@ -227,7 +216,6 @@ int get_rock_ridge_filename(struct iso_directory_record * de, printk("RR: RE (%x)\n", inode->i_ino); #endif if (buffer) kfree(buffer); - if (retname) kfree(retname); return -1; default: break; @@ -235,15 +223,9 @@ int get_rock_ridge_filename(struct iso_directory_record * de, }; } MAYBE_CONTINUE(repeat,inode); - if(retname){ - *name = retname; - *namlen = retnamlen; - return 1; - }; - return 0; /* This file did not have a NM field */ + return retnamlen; /* If 0, this file did not have a NM field */ out: if(buffer) kfree(buffer); - if (retname) kfree(retname); return 0; } |