Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345679
b: refs/heads/master
c: fb719c5
h: refs/heads/master
i:
  345677: af57ae0
  345675: 384953f
  345671: 2547e21
  345663: 6245e8e
v: v3
  • Loading branch information
Namjae Jeon authored and Jan Kara committed Dec 13, 2012
1 parent 1046ce3 commit 722b57b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: 2fb7d99d0de3fd8ae869f35ab682581d8455887a
refs/heads/master: fb719c59bdb4fca86ee1fd1f42ab3735ca12b6b2
7 changes: 5 additions & 2 deletions trunk/fs/udf/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
struct udf_inode_info *iinfo = UDF_I(inode);
int goal = 0, pgoal = iinfo->i_location.logicalBlockNum;
int lastblock = 0;
bool isBeyondEOF;

*err = 0;
*new = 0;
Expand Down Expand Up @@ -680,7 +681,7 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
/* Are we beyond EOF? */
if (etype == -1) {
int ret;

isBeyondEOF = 1;
if (count) {
if (c)
laarr[0] = laarr[1];
Expand Down Expand Up @@ -723,6 +724,7 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
endnum = c + 1;
lastblock = 1;
} else {
isBeyondEOF = 0;
endnum = startnum = ((count > 2) ? 2 : count);

/* if the current extent is in position 0,
Expand Down Expand Up @@ -770,7 +772,8 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
*err = -ENOSPC;
return 0;
}
iinfo->i_lenExtents += inode->i_sb->s_blocksize;
if (isBeyondEOF)
iinfo->i_lenExtents += inode->i_sb->s_blocksize;
}

/* if the extent the requsted block is located in contains multiple
Expand Down

0 comments on commit 722b57b

Please sign in to comment.