Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140013
b: refs/heads/master
c: f90981f
h: refs/heads/master
i:
  140011: 0407351
v: v3
  • Loading branch information
Jan Kara committed Apr 2, 2009
1 parent 3749634 commit 283550e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 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: 87bc730c07a0884d14d6af5c9d49f4669c0a0589
refs/heads/master: f90981fed974759b5057c5a04299fe03d9dbf1d2
21 changes: 13 additions & 8 deletions trunk/fs/udf/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,21 +731,26 @@ static sector_t udf_scan_anchors(struct super_block *sb, sector_t lastblock)
sector_t last[6];
int i;
struct udf_sb_info *sbi = UDF_SB(sb);

last[0] = lastblock;
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;
int last_count = 0;

last[last_count++] = lastblock;
if (lastblock >= 1)
last[last_count++] = lastblock - 1;
last[last_count++] = lastblock + 1;
if (lastblock >= 2)
last[last_count++] = lastblock - 2;
if (lastblock >= 150)
last[last_count++] = lastblock - 150;
if (lastblock >= 152)
last[last_count++] = lastblock - 152;

/* according to spec, anchor is in either:
* block 256
* lastblock-256
* lastblock
* however, if the disc isn't closed, it could be 512 */

for (i = 0; i < ARRAY_SIZE(last); i++) {
for (i = 0; i < last_count; i++) {
if (last[i] >= sb->s_bdev->bd_inode->i_size >>
sb->s_blocksize_bits)
continue;
Expand Down

0 comments on commit 283550e

Please sign in to comment.