diff options
-rw-r--r-- | fs/xfs/xfs_inode.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index ce278b3ae7fc..391d36b0e68c 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -2841,10 +2841,14 @@ xfs_iflush( | |||
2841 | mp = ip->i_mount; | 2841 | mp = ip->i_mount; |
2842 | 2842 | ||
2843 | /* | 2843 | /* |
2844 | * If the inode isn't dirty, then just release the inode | 2844 | * If the inode isn't dirty, then just release the inode flush lock and |
2845 | * flush lock and do nothing. | 2845 | * do nothing. Treat stale inodes the same; we cannot rely on the |
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. | ||
2846 | */ | 2850 | */ |
2847 | if (xfs_inode_clean(ip)) { | 2851 | if (xfs_inode_clean(ip) || xfs_iflags_test(ip, XFS_ISTALE)) { |
2848 | xfs_ifunlock(ip); | 2852 | xfs_ifunlock(ip); |
2849 | return 0; | 2853 | return 0; |
2850 | } | 2854 | } |