diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-12-16 05:34:03 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-12-16 05:34:03 +0000 |
commit | 967c65a99059fd459b956c1588ce0ba227912c4e (patch) | |
tree | 8224d013ff5d255420713d05610c7efebd204d2a /fs/isofs | |
parent | e20c1cc1656a66a2773bca4591a895cbc12696ff (diff) |
Merge with Linux 2.1.72, part 1.
Diffstat (limited to 'fs/isofs')
-rw-r--r-- | fs/isofs/inode.c | 9 | ||||
-rw-r--r-- | fs/isofs/namei.c | 35 |
2 files changed, 24 insertions, 20 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index b77e9facd..88cf1fd4a 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c @@ -33,6 +33,7 @@ * wrong information within the volume descriptors. */ #define IGNORE_WRONG_MULTI_VOLUME_SPECS +#define BEQUIET #ifdef LEAK_CHECK static int check_malloc = 0; @@ -237,7 +238,7 @@ static unsigned int isofs_get_last_session(kdev_t dev) * we would destroy the kernels idea about FS on root * mount in read_super... [chexum] */ - unsigned long old_fs=get_fs(); + mm_segment_t old_fs=get_fs(); inode_fake.i_rdev=dev; ms_info.addr_format=CDROM_LBA; set_fs(KERNEL_DS); @@ -500,7 +501,8 @@ struct super_block *isofs_read_super(struct super_block *s,void *data, s->s_flags |= MS_RDONLY /* | MS_NODEV | MS_NOSUID */; brelse(bh); - + +#ifndef BEQUIET printk(KERN_DEBUG "Max size:%ld Log zone size:%ld\n", s->u.isofs_sb.s_max_size, 1UL << s->u.isofs_sb.s_log_zone_size); @@ -509,6 +511,7 @@ struct super_block *isofs_read_super(struct super_block *s,void *data, (isonum_733(rootp->extent) + isonum_711(rootp->ext_attr_length)) << s -> u.isofs_sb.s_log_zone_size); if(high_sierra) printk(KERN_DEBUG "Disc in High Sierra format.\n"); +#endif unlock_super(s); /* set up enough so that it can read an inode */ @@ -541,7 +544,9 @@ struct super_block *isofs_read_super(struct super_block *s,void *data, } } set_blocksize(dev, opt.blocksize); +#ifndef BEQUIET printk(KERN_DEBUG "Forcing new log zone size:%d\n", opt.blocksize); +#endif } #ifdef CONFIG_JOLIET diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c index 1bedcf9be..f638084b6 100644 --- a/fs/isofs/namei.c +++ b/fs/isofs/namei.c @@ -66,7 +66,7 @@ static struct buffer_head * isofs_find_entry(struct inode * dir, unsigned char bufbits = ISOFS_BUFFER_BITS(dir); unsigned int block, i, f_pos, offset, inode_number = 0; /* shut gcc up */ - struct buffer_head * bh; + struct buffer_head * bh , * retval = NULL; unsigned int old_offset; int dlen, match; char * dpnt; @@ -86,7 +86,7 @@ static struct buffer_head * isofs_find_entry(struct inode * dir, block = isofs_bmap(dir,f_pos >> bufbits); if (!block || !(bh = bread(dir->i_dev,block,bufsize))) return NULL; - + while (f_pos < dir->i_size) { /* if de is in kmalloc'd memory, do not point to the @@ -118,13 +118,14 @@ static struct buffer_head * isofs_find_entry(struct inode * dir, + ISOFS_BLOCK_SIZE); } brelse(bh); + bh = NULL; if (f_pos >= dir->i_size) - return 0; + break; block = isofs_bmap(dir,f_pos>>bufbits); if (!block || !(bh = bread(dir->i_dev,block,bufsize))) - return NULL; + break; continue; /* Will kick out if past end of directory */ } @@ -145,7 +146,7 @@ static struct buffer_head * isofs_find_entry(struct inode * dir, block = isofs_bmap(dir,f_pos>>bufbits); if (!block || !(bh_next = bread(dir->i_dev,block,bufsize))) - return NULL; + break; de = (struct iso_directory_record *) kmalloc(offset - old_offset, GFP_KERNEL); @@ -162,14 +163,14 @@ static struct buffer_head * isofs_find_entry(struct inode * dir, if (dir->i_sb->u.isofs_sb.s_rock || dir->i_sb->u.isofs_sb.s_joliet_level) { - page = (unsigned char *) - __get_free_page(GFP_KERNEL); - if (!page) return NULL; + if (! page) { + page = (unsigned char *) + __get_free_page(GFP_KERNEL); + if (!page) break; + } } if (dir->i_sb->u.isofs_sb.s_rock && ((i = get_rock_ridge_filename(de, page, dir)))) { - if (i == -1) - goto out;/* Relocated deep directory */ dlen = i; dpnt = page; #ifdef CONFIG_JOLIET @@ -203,8 +204,6 @@ static struct buffer_head * isofs_find_entry(struct inode * dir, { match = isofs_match(namelen,name,dpnt,dlen); } - - if (page) free_page((unsigned long) page); if (match) { if(inode_number == -1) { /* Should only happen for the '..' entry */ @@ -213,16 +212,16 @@ static struct buffer_head * isofs_find_entry(struct inode * dir, find_rock_ridge_relocation(de,dir)); } *ino = inode_number; - if(de_not_in_buf) - kfree(de); - return bh; + retval = bh; + bh = NULL; + break; } } - out: - brelse(bh); + if (page) free_page((unsigned long) page); + if (bh) brelse(bh); if(de_not_in_buf) kfree(de); - return NULL; + return retval; } int isofs_lookup(struct inode * dir, struct dentry * dentry) |