Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118456
b: refs/heads/master
c: 5e35dd4
h: refs/heads/master
v: v3
  • Loading branch information
OGAWA Hirofumi authored and Linus Torvalds committed Nov 6, 2008
1 parent 2fe12a4 commit a8891bf
Show file tree
Hide file tree
Showing 2 changed files with 15 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: d3dfa8228f87ab9960ab8b4718013d68e3c25a43
refs/heads/master: 5e35dd4651002207948f10c576fc7d9bad448815
18 changes: 14 additions & 4 deletions trunk/fs/fat/fatent.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,20 @@ static inline int fat_ent_update_ptr(struct super_block *sb,
/* Is this fatent's blocks including this entry? */
if (!fatent->nr_bhs || bhs[0]->b_blocknr != blocknr)
return 0;
/* Does this entry need the next block? */
if (sbi->fat_bits == 12 && (offset + 1) >= sb->s_blocksize) {
if (fatent->nr_bhs != 2 || bhs[1]->b_blocknr != (blocknr + 1))
return 0;
if (sbi->fat_bits == 12) {
if ((offset + 1) < sb->s_blocksize) {
/* This entry is on bhs[0]. */
if (fatent->nr_bhs == 2) {
brelse(bhs[1]);
fatent->nr_bhs = 1;
}
} else {
/* This entry needs the next block. */
if (fatent->nr_bhs != 2)
return 0;
if (bhs[1]->b_blocknr != (blocknr + 1))
return 0;
}
}
ops->ent_set_ptr(fatent, offset);
return 1;
Expand Down

0 comments on commit a8891bf

Please sign in to comment.