Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307705
b: refs/heads/master
c: f38996f
h: refs/heads/master
i:
  307703: e9c404d
v: v3
  • Loading branch information
Christoph Hellwig authored and Ben Myers committed May 14, 2012
1 parent e49556a commit 05daacb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 467f78992a0743e0e71729e4faa20b67b0f25289
refs/heads/master: f38996f5768713fb60e1d2de66c097367d54bb6a
14 changes: 7 additions & 7 deletions trunk/fs/xfs/xfs_iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ xfs_setattr_size(
xfs_off_t oldsize, newsize;
struct xfs_trans *tp;
int error;
uint lock_flags;
uint lock_flags = 0;
uint commit_flags = 0;

trace_xfs_setattr(ip);
Expand All @@ -720,10 +720,10 @@ xfs_setattr_size(
ATTR_MTIME_SET|ATTR_KILL_SUID|ATTR_KILL_SGID|
ATTR_KILL_PRIV|ATTR_TIMES_SET)) == 0);

lock_flags = XFS_ILOCK_EXCL;
if (!(flags & XFS_ATTR_NOLOCK))
if (!(flags & XFS_ATTR_NOLOCK)) {
lock_flags |= XFS_IOLOCK_EXCL;
xfs_ilock(ip, lock_flags);
xfs_ilock(ip, lock_flags);
}

oldsize = inode->i_size;
newsize = iattr->ia_size;
Expand All @@ -746,7 +746,7 @@ xfs_setattr_size(
/*
* Make sure that the dquots are attached to the inode.
*/
error = xfs_qm_dqattach_locked(ip, 0);
error = xfs_qm_dqattach(ip, 0);
if (error)
goto out_unlock;

Expand All @@ -764,12 +764,12 @@ xfs_setattr_size(
* before the inode is joined to the transaction to modify
* i_size.
*/
xfs_ilock(ip, XFS_ILOCK_EXCL);
error = xfs_zero_eof(ip, newsize, oldsize);
xfs_iunlock(ip, XFS_ILOCK_EXCL);
if (error)
goto out_unlock;
}
xfs_iunlock(ip, XFS_ILOCK_EXCL);
lock_flags &= ~XFS_ILOCK_EXCL;

/*
* We are going to log the inode size change in this transaction so
Expand Down

0 comments on commit 05daacb

Please sign in to comment.