| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 9/9] xfs: switch to NOFS allocation under i_lock in xfs_attr_rmtval_get |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Sat, 18 Jul 2009 18:15:01 -0400 |
| Cc: | sage@xxxxxxxxxxxx |
| References: | <20090718221452.594956000@xxxxxxxxxxxxxxxxxxxxxx> |
| User-agent: | quilt/0.47-1 |
xfs_attr_rmtval_get is always 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.
Index: linux-2.6/fs/xfs/xfs_attr.c
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_attr.c 2009-07-18 22:34:08.947532301 +0200
+++ linux-2.6/fs/xfs/xfs_attr.c 2009-07-18 22:35:44.786660003 +0200
@@ -2010,7 +2010,9 @@ xfs_attr_rmtval_get(xfs_da_args_t *args)
dblkno = XFS_FSB_TO_DADDR(mp, map[i].br_startblock);
blkcnt = XFS_FSB_TO_BB(mp, map[i].br_blockcount);
error = xfs_read_buf(mp, mp->m_ddev_targp, dblkno,
- blkcnt, XFS_BUF_LOCK, &bp);
+ blkcnt,
+ XFS_BUF_LOCK | XBF_DONT_BLOCK,
+ &bp);
if (error)
return(error);
|
| Previous by Date: | [PATCH 8/9] xfs: switch to NOFS allocation under i_lock in xfs_readlink_bmap, Christoph Hellwig |
|---|---|
| Next by Date: | [PATCH 2/9] xfs: switch to NOFS allocation under i_lock in xfs_getbmap, Christoph Hellwig |
| Previous by Thread: | [PATCH 8/9] xfs: switch to NOFS allocation under i_lock in xfs_readlink_bmap, Christoph Hellwig |
| Next by Thread: | [PATCH 2/9] xfs: switch to NOFS allocation under i_lock in xfs_getbmap, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |