Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91835
b: refs/heads/master
c: 5fb28aa
h: refs/heads/master
i:
  91833: 3e9b962
  91831: d860aa5
v: v3
  • Loading branch information
Jan Kara committed Apr 17, 2008
1 parent 169f751 commit c502406
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 423cf6dc04eb79d441bfda2b127bc4b57134b41d
refs/heads/master: 5fb28aa25ab0b71af2e441d68e63ad257e610a04
13 changes: 9 additions & 4 deletions trunk/fs/udf/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,14 +709,16 @@ static int udf_check_anchor_block(struct super_block *sb, sector_t block,
static sector_t udf_scan_anchors(struct super_block *sb, bool varconv,
sector_t lastblock)
{
sector_t last[4];
sector_t last[6];
int i;
struct udf_sb_info *sbi = UDF_SB(sb);

last[0] = lastblock;
last[1] = last[0] - 2;
last[2] = last[0] - 150;
last[3] = last[0] - 152;
last[1] = last[0] - 1;
last[2] = last[0] + 1;
last[3] = last[0] - 2;
last[4] = last[0] - 150;
last[5] = last[0] - 152;

/* according to spec, anchor is in either:
* block 256
Expand All @@ -727,6 +729,9 @@ static sector_t udf_scan_anchors(struct super_block *sb, bool varconv,
for (i = 0; i < ARRAY_SIZE(last); i++) {
if (last[i] < 0)
continue;
if (last[i] >= sb->s_bdev->bd_inode->i_size >>
sb->s_blocksize_bits)
continue;

if (udf_check_anchor_block(sb, last[i], varconv)) {
sbi->s_anchor[0] = last[i];
Expand Down

0 comments on commit c502406

Please sign in to comment.