From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n7PIPfaH216628 for ; Tue, 25 Aug 2009 13:25:56 -0500 Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 184363F9017 for ; Tue, 25 Aug 2009 11:26:14 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id dhW5YYCz2OJiVXnx for ; Tue, 25 Aug 2009 11:26:14 -0700 (PDT) Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1Mg0ij-0001Ga-R7 for xfs@oss.sgi.com; Tue, 25 Aug 2009 18:26:13 +0000 Message-Id: <20090825182613.740162763@bombadil.infradead.org> Date: Tue, 25 Aug 2009 14:21:42 -0400 From: Christoph Hellwig Subject: [PATCH 8/9] xfs: switch to NOFS allocation under i_lock in xfs_readlink_bmap References: <20090825182134.299870049@bombadil.infradead.org> Content-Disposition: inline; filename=xfs-lockdep-buf-3 List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: xfs@oss.sgi.com xfs_readlink_bmap is called with i_lock held, but i_lock is taken in reclaim context so all allocations under it must avoid recursions into the filesystem. Reported by the new reclaim context tracing in lockdep. Signed-off-by: Christoph Hellwig Index: linux-2.6/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6.orig/fs/xfs/xfs_vnodeops.c 2009-07-18 20:29:59.041657600 +0200 +++ linux-2.6/fs/xfs/xfs_vnodeops.c 2009-07-18 20:31:22.964535322 +0200 @@ -547,7 +547,9 @@ xfs_readlink_bmap( d = XFS_FSB_TO_DADDR(mp, mval[n].br_startblock); byte_cnt = XFS_FSB_TO_B(mp, mval[n].br_blockcount); - bp = xfs_buf_read(mp->m_ddev_targp, d, BTOBB(byte_cnt), 0); + bp = xfs_buf_read_flags(mp->m_ddev_targp, d, BTOBB(byte_cnt), + XBF_LOCK | XBF_MAPPED | + XBF_DONT_BLOCK); error = XFS_BUF_GETERROR(bp); if (error) { xfs_ioerror_alert("xfs_readlink", _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs