diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-01-25 15:52:48 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-01-25 15:52:48 +0100 |
commit | f1487fcbe47cd2bc0c71e8598bf9eb6a82dec544 (patch) | |
tree | 4c7abed6047538c13dd024a8ecffd15f31b4609a /fs/xfs/xfs_inode.c | |
parent | ASoC: ad1836: reset and restore clock control mode in suspend/resume entry (diff) | |
parent | ASoC: fix a memory-leak in wm8903 (diff) | |
download | linux-f1487fcbe47cd2bc0c71e8598bf9eb6a82dec544.tar.xz linux-f1487fcbe47cd2bc0c71e8598bf9eb6a82dec544.zip |
Merge branch 'for-2.6.33' into for-2.6.34
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index ce278b3ae7fc..ef77fd88c8e3 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -2841,8 +2841,8 @@ xfs_iflush( mp = ip->i_mount; /* - * If the inode isn't dirty, then just release the inode - * flush lock and do nothing. + * If the inode isn't dirty, then just release the inode flush lock and + * do nothing. */ if (xfs_inode_clean(ip)) { xfs_ifunlock(ip); @@ -2868,6 +2868,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 * to disk, because the log record didn't make it to disk! |