Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18169
b: refs/heads/master
c: 68bdb6e
h: refs/heads/master
i:
  18167: e3476f2
v: v3
  • Loading branch information
Yingping Lu authored and Nathan Scott committed Jan 11, 2006
1 parent 16033db commit c5baf3f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 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: a6867a6815fa0241848d4620f2dbd2954f4405d7
refs/heads/master: 68bdb6eabcd2869caa795019961a5445a11b5bc1
4 changes: 4 additions & 0 deletions trunk/fs/xfs/linux-2.6/xfs_lrw.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,10 @@ xfs_write(
goto retry;
}

isize = i_size_read(inode);
if (unlikely(ret < 0 && ret != -EFAULT && *offset > isize))
*offset = isize;

if (*offset > xip->i_d.di_size) {
xfs_ilock(xip, XFS_ILOCK_EXCL);
if (*offset > xip->i_d.di_size) {
Expand Down
9 changes: 6 additions & 3 deletions trunk/fs/xfs/xfs_vnodeops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,8 @@ xfs_inactive_free_eofblocks(
xfs_iunlock(ip, XFS_ILOCK_SHARED);

if (!error && (nimaps != 0) &&
(imap.br_startblock != HOLESTARTBLOCK)) {
(imap.br_startblock != HOLESTARTBLOCK ||
ip->i_delayed_blks)) {
/*
* Attach the dquots to the inode up front.
*/
Expand Down Expand Up @@ -1548,7 +1549,8 @@ xfs_release(

if (ip->i_d.di_nlink != 0) {
if ((((ip->i_d.di_mode & S_IFMT) == S_IFREG) &&
((ip->i_d.di_size > 0) || (VN_CACHED(vp) > 0)) &&
((ip->i_d.di_size > 0) || (VN_CACHED(vp) > 0 ||
ip->i_delayed_blks > 0)) &&
(ip->i_df.if_flags & XFS_IFEXTENTS)) &&
(!(ip->i_d.di_flags &
(XFS_DIFLAG_PREALLOC | XFS_DIFLAG_APPEND)))) {
Expand Down Expand Up @@ -1627,7 +1629,8 @@ xfs_inactive(

if (ip->i_d.di_nlink != 0) {
if ((((ip->i_d.di_mode & S_IFMT) == S_IFREG) &&
((ip->i_d.di_size > 0) || (VN_CACHED(vp) > 0)) &&
((ip->i_d.di_size > 0) || (VN_CACHED(vp) > 0 ||
ip->i_delayed_blks > 0)) &&
(ip->i_df.if_flags & XFS_IFEXTENTS) &&
(!(ip->i_d.di_flags &
(XFS_DIFLAG_PREALLOC | XFS_DIFLAG_APPEND)) ||
Expand Down

0 comments on commit c5baf3f

Please sign in to comment.