X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fudf%2Fdirectory.c;h=198caa33027a99f5a6371f8077cac32ba3b6f53f;hb=refs%2Fheads%2Fvserver;hp=fe751a2a0e478d5debb692a7ae23d0c1dc750b6a;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/fs/udf/directory.c b/fs/udf/directory.c index fe751a2a0..198caa330 100644 --- a/fs/udf/directory.c +++ b/fs/udf/directory.c @@ -36,14 +36,14 @@ udf_filead_read(struct inode *dir, uint8_t *tmpad, uint8_t ad_size, if (!ad) { - udf_release_data(*bh); + brelse(*bh); *error = 1; return NULL; } if (*offset == dir->i_sb->s_blocksize) { - udf_release_data(*bh); + brelse(*bh); block = udf_get_lb_pblock(dir->i_sb, fe_loc, ++*pos); if (!block) return NULL; @@ -57,7 +57,7 @@ udf_filead_read(struct inode *dir, uint8_t *tmpad, uint8_t ad_size, remainder = dir->i_sb->s_blocksize - loffset; memcpy((uint8_t *)ad, (*bh)->b_data + loffset, remainder); - udf_release_data(*bh); + brelse(*bh); block = udf_get_lb_pblock(dir->i_sb, fe_loc, ++*pos); if (!block) return NULL; @@ -75,9 +75,9 @@ struct fileIdentDesc * udf_fileident_read(struct inode *dir, loff_t *nf_pos, struct udf_fileident_bh *fibh, struct fileIdentDesc *cfi, - kernel_lb_addr *bloc, uint32_t *extoffset, + struct extent_position *epos, kernel_lb_addr *eloc, uint32_t *elen, - uint32_t *offset, struct buffer_head **bh) + sector_t *offset) { struct fileIdentDesc *fi; int i, num, block; @@ -105,13 +105,11 @@ udf_fileident_read(struct inode *dir, loff_t *nf_pos, if (fibh->eoffset == dir->i_sb->s_blocksize) { - int lextoffset = *extoffset; + int lextoffset = epos->offset; - if (udf_next_aext(dir, bloc, extoffset, eloc, elen, bh, 1) != + if (udf_next_aext(dir, epos, eloc, elen, 1) != (EXT_RECORDED_ALLOCATED >> 30)) - { return NULL; - } block = udf_get_lb_pblock(dir->i_sb, *eloc, *offset); @@ -120,9 +118,9 @@ udf_fileident_read(struct inode *dir, loff_t *nf_pos, if ((*offset << dir->i_sb->s_blocksize_bits) >= *elen) *offset = 0; else - *extoffset = lextoffset; + epos->offset = lextoffset; - udf_release_data(fibh->sbh); + brelse(fibh->sbh); if (!(fibh->sbh = fibh->ebh = udf_tread(dir->i_sb, block))) return NULL; fibh->soffset = fibh->eoffset = 0; @@ -151,7 +149,7 @@ udf_fileident_read(struct inode *dir, loff_t *nf_pos, } else if (fibh->sbh != fibh->ebh) { - udf_release_data(fibh->sbh); + brelse(fibh->sbh); fibh->sbh = fibh->ebh; } @@ -169,13 +167,11 @@ udf_fileident_read(struct inode *dir, loff_t *nf_pos, } else if (fibh->eoffset > dir->i_sb->s_blocksize) { - int lextoffset = *extoffset; + int lextoffset = epos->offset; - if (udf_next_aext(dir, bloc, extoffset, eloc, elen, bh, 1) != + if (udf_next_aext(dir, epos, eloc, elen, 1) != (EXT_RECORDED_ALLOCATED >> 30)) - { return NULL; - } block = udf_get_lb_pblock(dir->i_sb, *eloc, *offset); @@ -184,7 +180,7 @@ udf_fileident_read(struct inode *dir, loff_t *nf_pos, if ((*offset << dir->i_sb->s_blocksize_bits) >= *elen) *offset = 0; else - *extoffset = lextoffset; + epos->offset = lextoffset; fibh->soffset -= dir->i_sb->s_blocksize; fibh->eoffset -= dir->i_sb->s_blocksize;