Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179559
b: refs/heads/master
c: 4b6a468
h: refs/heads/master
i:
  179557: 2421080
  179555: a48753e
  179551: 463660f
v: v3
  • Loading branch information
Dave Chinner authored and Alex Elder committed Jan 15, 2010
1 parent 4355b48 commit 1d398bc
Show file tree
Hide file tree
Showing 2 changed files with 16 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: 126976c7c17d3bdfbc1fe9e0af8bee9f62d14cc6
refs/heads/master: 4b6a46882cca8349e8942e2650c33b11bc571c92
21 changes: 15 additions & 6 deletions trunk/fs/xfs/xfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2842,13 +2842,9 @@ xfs_iflush(

/*
* If the inode isn't dirty, then just release the inode flush lock and
* do nothing. Treat stale inodes the same; we cannot rely on the
* backing buffer remaining stale in cache for the remaining life of
* the stale inode and so xfs_itobp() below may give us a buffer that
* no longer contains inodes below. Doing this stale check here also
* avoids forcing the log on pinned, stale inodes.
* do nothing.
*/
if (xfs_inode_clean(ip) || xfs_iflags_test(ip, XFS_ISTALE)) {
if (xfs_inode_clean(ip)) {
xfs_ifunlock(ip);
return 0;
}
Expand All @@ -2871,6 +2867,19 @@ xfs_iflush(
}
xfs_iunpin_wait(ip);

/*
* For stale inodes we cannot rely on the backing buffer remaining
* stale in cache for the remaining life of the stale inode and so
* xfs_itobp() below may give us a buffer that no longer contains
* inodes below. We have to check this after ensuring the inode is
* unpinned so that it is safe to reclaim the stale inode after the
* flush call.
*/
if (xfs_iflags_test(ip, XFS_ISTALE)) {
xfs_ifunlock(ip);
return 0;
}

/*
* This may have been unpinned because the filesystem is shutting
* down forcibly. If that's the case we must not write this inode
Expand Down

0 comments on commit 1d398bc

Please sign in to comment.