Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64621
b: refs/heads/master
c: bcec447
h: refs/heads/master
i:
  64619: 37bed4e
v: v3
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Aug 31, 2007
1 parent 145e27f commit 720421f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 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: 989f89c57e6361e7d16fbd9572b5da7d313b073d
refs/heads/master: bcec44770cc65660369ae17b4e44be027a64a46c
26 changes: 22 additions & 4 deletions trunk/fs/udf/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static int udf_find_fileset(struct super_block *, kernel_lb_addr *,
static void udf_load_pvoldesc(struct super_block *, struct buffer_head *);
static void udf_load_fileset(struct super_block *, struct buffer_head *,
kernel_lb_addr *);
static void udf_load_partdesc(struct super_block *, struct buffer_head *);
static int udf_load_partdesc(struct super_block *, struct buffer_head *);
static void udf_open_lvid(struct super_block *);
static void udf_close_lvid(struct super_block *);
static unsigned int udf_count_free(struct super_block *);
Expand Down Expand Up @@ -877,7 +877,7 @@ static void udf_load_fileset(struct super_block *sb, struct buffer_head *bh,
root->logicalBlockNum, root->partitionReferenceNum);
}

static void udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)
static int udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)
{
struct partitionDesc *p;
int i;
Expand Down Expand Up @@ -912,6 +912,11 @@ static void udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)

UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table =
udf_iget(sb, loc);
if (!UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table) {
udf_debug("cannot load unallocSpaceTable (part %d)\n",
i);
return 1;
}
UDF_SB_PARTFLAGS(sb,i) |= UDF_PART_FLAG_UNALLOC_TABLE;
udf_debug("unallocSpaceTable (part %d) @ %ld\n",
i, UDF_SB_PARTMAPS(sb)[i].s_uspace.s_table->i_ino);
Expand All @@ -938,6 +943,11 @@ static void udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)

UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table =
udf_iget(sb, loc);
if (!UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table) {
udf_debug("cannot load freedSpaceTable (part %d)\n",
i);
return 1;
}
UDF_SB_PARTFLAGS(sb,i) |= UDF_PART_FLAG_FREED_TABLE;
udf_debug("freedSpaceTable (part %d) @ %ld\n",
i, UDF_SB_PARTMAPS(sb)[i].s_fspace.s_table->i_ino);
Expand Down Expand Up @@ -966,6 +976,7 @@ static void udf_load_partdesc(struct super_block *sb, struct buffer_head *bh)
le16_to_cpu(p->partitionNumber), i, UDF_SB_PARTTYPE(sb,i),
UDF_SB_PARTROOT(sb,i), UDF_SB_PARTLEN(sb,i));
}
return 0;
}

static int udf_load_logicalvol(struct super_block *sb, struct buffer_head *bh,
Expand Down Expand Up @@ -1177,12 +1188,19 @@ static int udf_process_sequence(struct super_block *sb, long block, long lastblo
udf_load_logicalvol(sb, bh, fileset);
} else if (i == VDS_POS_PARTITION_DESC) {
struct buffer_head *bh2 = NULL;
udf_load_partdesc(sb, bh);
if (udf_load_partdesc(sb, bh)) {
brelse(bh);
return 1;
}
for (j = vds[i].block + 1; j < vds[VDS_POS_TERMINATING_DESC].block; j++) {
bh2 = udf_read_tagged(sb, j, j, &ident);
gd = (struct generic_desc *)bh2->b_data;
if (ident == TAG_IDENT_PD)
udf_load_partdesc(sb, bh2);
if (udf_load_partdesc(sb, bh2)) {
brelse(bh);
brelse(bh2);
return 1;
}
brelse(bh2);
}
}
Expand Down

0 comments on commit 720421f

Please sign in to comment.