Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124961
b: refs/heads/master
c: 2505115
h: refs/heads/master
i:
  124959: 8f48abc
v: v3
  • Loading branch information
Lachlan McIlroy committed Dec 24, 2008
1 parent ee45cc9 commit 9ee066a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 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: ad1ad968f4e7b06c75741575ea077e25a87da49a
refs/heads/master: 25051158bbed127e8672b43396c71c5eb610e5f1
27 changes: 12 additions & 15 deletions trunk/fs/xfs/linux-2.6/xfs_lrw.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,6 @@ xfs_write(
}
}

retry:
/* We can write back this queue in page reclaim */
current->backing_dev_info = mapping->backing_dev_info;

Expand Down Expand Up @@ -763,6 +762,17 @@ xfs_write(
if (ret == -EIOCBQUEUED && !(ioflags & IO_ISAIO))
ret = wait_on_sync_kiocb(iocb);

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

if (*offset > xip->i_size) {
xfs_ilock(xip, XFS_ILOCK_EXCL);
if (*offset > xip->i_size)
xip->i_size = *offset;
xfs_iunlock(xip, XFS_ILOCK_EXCL);
}

if (ret == -ENOSPC &&
DM_EVENT_ENABLED(xip, DM_EVENT_NOSPACE) && !(ioflags & IO_INVIS)) {
xfs_iunlock(xip, iolock);
Expand All @@ -776,20 +786,7 @@ xfs_write(
xfs_ilock(xip, iolock);
if (error)
goto out_unlock_internal;
pos = xip->i_size;
ret = 0;
goto retry;
}

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

if (*offset > xip->i_size) {
xfs_ilock(xip, XFS_ILOCK_EXCL);
if (*offset > xip->i_size)
xip->i_size = *offset;
xfs_iunlock(xip, XFS_ILOCK_EXCL);
goto start;
}

error = -ret;
Expand Down

0 comments on commit 9ee066a

Please sign in to comment.