diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2010-02-02 03:05:22 -0500 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2010-02-02 03:05:22 -0500 |
| commit | fb7899b1f0b748ef966071f5dc23c59ebd57d08f (patch) | |
| tree | 2f13f9d8607871a60334608524e8b4e9447f5309 /fs/xfs/xfs_inode.c | |
| parent | 212b3c8b8ab94d983c2e0ee1821f17dd5b4e0859 (diff) | |
| parent | abe94c756c08d50566c09a65b9c7fe72f83071c5 (diff) | |
Merge commit 'v2.6.33-rc6' into secretlab/next-spi
Diffstat (limited to 'fs/xfs/xfs_inode.c')
| -rw-r--r-- | fs/xfs/xfs_inode.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 391d36b0e68c..ef77fd88c8e3 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
| @@ -2842,13 +2842,9 @@ xfs_iflush( | |||
| 2842 | 2842 | ||
| 2843 | /* | 2843 | /* |
| 2844 | * If the inode isn't dirty, then just release the inode flush lock and | 2844 | * If the inode isn't dirty, then just release the inode flush lock and |
| 2845 | * do nothing. Treat stale inodes the same; we cannot rely on the | 2845 | * do nothing. |
| 2846 | * backing buffer remaining stale in cache for the remaining life of | ||
| 2847 | * the stale inode and so xfs_itobp() below may give us a buffer that | ||
| 2848 | * no longer contains inodes below. Doing this stale check here also | ||
| 2849 | * avoids forcing the log on pinned, stale inodes. | ||
| 2850 | */ | 2846 | */ |
| 2851 | if (xfs_inode_clean(ip) || xfs_iflags_test(ip, XFS_ISTALE)) { | 2847 | if (xfs_inode_clean(ip)) { |
| 2852 | xfs_ifunlock(ip); | 2848 | xfs_ifunlock(ip); |
| 2853 | return 0; | 2849 | return 0; |
| 2854 | } | 2850 | } |
| @@ -2872,6 +2868,19 @@ xfs_iflush( | |||
| 2872 | xfs_iunpin_wait(ip); | 2868 | xfs_iunpin_wait(ip); |
| 2873 | 2869 | ||
| 2874 | /* | 2870 | /* |
| 2871 | * For stale inodes we cannot rely on the backing buffer remaining | ||
| 2872 | * stale in cache for the remaining life of the stale inode and so | ||
| 2873 | * xfs_itobp() below may give us a buffer that no longer contains | ||
| 2874 | * inodes below. We have to check this after ensuring the inode is | ||
| 2875 | * unpinned so that it is safe to reclaim the stale inode after the | ||
| 2876 | * flush call. | ||
| 2877 | */ | ||
| 2878 | if (xfs_iflags_test(ip, XFS_ISTALE)) { | ||
| 2879 | xfs_ifunlock(ip); | ||
| 2880 | return 0; | ||
| 2881 | } | ||
| 2882 | |||
| 2883 | /* | ||
| 2875 | * This may have been unpinned because the filesystem is shutting | 2884 | * This may have been unpinned because the filesystem is shutting |
| 2876 | * down forcibly. If that's the case we must not write this inode | 2885 | * down forcibly. If that's the case we must not write this inode |
| 2877 | * to disk, because the log record didn't make it to disk! | 2886 | * to disk, because the log record didn't make it to disk! |
