Index: linux-2.6/fs/xfs/xfs_sync.c =================================================================== --- linux-2.6.orig/fs/xfs/xfs_sync.c 2011-10-24 10:02:27.361971264 +0200 +++ linux-2.6/fs/xfs/xfs_sync.c 2011-10-24 10:11:03.301036954 +0200 @@ -764,7 +764,8 @@ xfs_reclaim_inode( struct xfs_perag *pag, int sync_mode) { - int error; + struct xfs_mount *mp = ip->i_mount; + int error; restart: error = 0; @@ -772,6 +773,18 @@ restart: if (!xfs_iflock_nowait(ip)) { if (!(sync_mode & SYNC_WAIT)) goto out; + + /* + * If the inode is flush locked we probably had someone else + * push it to the buffer and the buffer is now sitting in + * the delwri list. + * + * Use the big hammer to force it. + */ + xfs_log_force(mp, XFS_LOG_SYNC); + set_bit(XBT_FORCE_FLUSH, &mp->m_ddev_targp->bt_flags); + wake_up_process(mp->m_ddev_targp->bt_task); + xfs_iflock(ip); }