Instead of trying to unpin a pinned inode buffer by forcing the log in xfs_iflush let the caller handle it. In case of AIL pushing we already handle it more efficiently by forcing the log synchronously once after cycling through all AIL entries. Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- fs/xfs/xfs_inode.c | 7 ------- fs/xfs/xfs_sync.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) Index: xfs/fs/xfs/xfs_inode.c =================================================================== --- xfs.orig/fs/xfs/xfs_inode.c 2011-10-27 22:40:16.244688077 +0200 +++ xfs/fs/xfs/xfs_inode.c 2011-10-27 22:40:16.821171772 +0200 @@ -2468,13 +2468,6 @@ xfs_iflush( goto corrupt_out; /* - * If the buffer is pinned then push on the log now so we won't - * get stuck waiting in the write for too long. - */ - if (xfs_buf_ispinned(bp)) - xfs_log_force(mp, 0); - - /* * inode clustering: * see if other inodes can be gathered into this write */ Index: xfs/fs/xfs/xfs_sync.c =================================================================== --- xfs.orig/fs/xfs/xfs_sync.c 2011-10-27 22:40:16.257172598 +0200 +++ xfs/fs/xfs/xfs_sync.c 2011-10-27 22:40:16.821171772 +0200 @@ -724,6 +724,13 @@ restart: delay(2); goto restart; } else if (!error) { + /* + * If the buffer is pinned then push on the log now so we + * won't get stuck waiting in the write for too long. + */ + if (xfs_buf_ispinned(bp)) + xfs_log_force(ip->i_mount, 0); + error = xfs_bwrite(bp); xfs_buf_relse(bp); } _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs