Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70840
b: refs/heads/master
c: 09262b4
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Tim Shimmin committed Oct 16, 2007
1 parent e901e19 commit 00726a3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 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: b3aea4edc2903fdee34920630b8b2433f6452f02
refs/heads/master: 09262b4339de5417a10803fbfac277eebb38ca5a
13 changes: 13 additions & 0 deletions trunk/fs/xfs/xfs_inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,19 @@ xfs_iflags_test(xfs_inode_t *ip, unsigned short flags)
spin_unlock(&ip->i_flags_lock);
return ret;
}

static inline int
xfs_iflags_test_and_clear(xfs_inode_t *ip, unsigned short flags)
{
int ret;

spin_lock(&ip->i_flags_lock);
ret = ip->i_flags & flags;
if (ret)
ip->i_flags &= ~flags;
spin_unlock(&ip->i_flags_lock);
return ret;
}
#endif /* __KERNEL__ */


Expand Down
7 changes: 1 addition & 6 deletions trunk/fs/xfs/xfs_vnodeops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1541,12 +1541,7 @@ xfs_release(
* significantly reducing the time window where we'd otherwise
* be exposed to that problem.
*/
spin_lock(&ip->i_flags_lock);
truncated = __xfs_iflags_test(ip, XFS_ITRUNCATED);
if (truncated)
ip->i_flags &= ~XFS_ITRUNCATED;
spin_unlock(&ip->i_flags_lock);

truncated = xfs_iflags_test_and_clear(ip, XFS_ITRUNCATED);
if (truncated && VN_DIRTY(vp) && ip->i_delayed_blks > 0)
xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE);
}
Expand Down

0 comments on commit 00726a3

Please sign in to comment.