Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84751
b: refs/heads/master
c: 05343c4
h: refs/heads/master
i:
  84749: 7eca822
  84747: b173886
  84743: 20fcb06
  84735: 73d5043
v: v3
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Feb 8, 2008
1 parent 0a6e504 commit b1ccacc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af793295bf9ee92660f5e77d337b0493cea3f9b9
refs/heads/master: 05343c4f2ee1a4f81f287d95b28c80ee565817c4
2 changes: 1 addition & 1 deletion trunk/fs/udf/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ struct buffer_head *udf_expand_dir_adinicb(struct inode *inode, int *block,
eloc.logicalBlockNum = *block;
eloc.partitionReferenceNum =
iinfo->i_location.partitionReferenceNum;
elen = inode->i_size;
elen = inode->i_sb->s_blocksize;
iinfo->i_lenExtents = elen;
epos.bh = NULL;
epos.block = iinfo->i_location;
Expand Down
19 changes: 10 additions & 9 deletions trunk/fs/udf/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir,
}

block = dinfo->i_location.logicalBlockNum;

} else {
block = udf_get_lb_pblock(dir->i_sb, dinfo->i_location, 0);
fibh->sbh = fibh->ebh = NULL;
Expand Down Expand Up @@ -474,6 +473,14 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir,
}

add:
if (dinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) {
elen = (elen + sb->s_blocksize - 1) & ~(sb->s_blocksize - 1);
if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
epos.offset -= sizeof(short_ad);
else if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG)
epos.offset -= sizeof(long_ad);
udf_write_aext(dir, &epos, eloc, elen, 1);
}
f_pos += nfidlen;

if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB &&
Expand All @@ -491,15 +498,9 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir,
if (!fibh->sbh)
return NULL;
epos.block = dinfo->i_location;
eloc.logicalBlockNum = block;
eloc.partitionReferenceNum =
dinfo->i_location.partitionReferenceNum;
elen = dir->i_sb->s_blocksize;
epos.offset = udf_file_entry_alloc_offset(dir);
if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
epos.offset += sizeof(short_ad);
else if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG)
epos.offset += sizeof(long_ad);
/* Load extent udf_expand_dir_adinicb() has created */
udf_current_aext(dir, &epos, &eloc, &elen, 1);
}

if (sb->s_blocksize - fibh->eoffset >= nfidlen) {
Expand Down

0 comments on commit b1ccacc

Please sign in to comment.