From 1a002bfc3a7daee10e162c6a8fa8c7638788bfdd Mon Sep 17 00:00:00 2001 From: Kamal Dasu Date: Thu, 23 Feb 2012 00:41:39 +0000 Subject: [PATCH] --- yaml --- r: 297212 b: refs/heads/master c: 5575acc7807595687288b3bbac15103f2a5462e1 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/xfs/xfs_bmap.c | 9 +++++++++ trunk/fs/xfs/xfs_rtalloc.c | 9 ++++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 24bed7c17611..a69a17624796 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1c2ccc66bcef992bec7bad6d52cade66d632d7fb +refs/heads/master: 5575acc7807595687288b3bbac15103f2a5462e1 diff --git a/trunk/fs/xfs/xfs_bmap.c b/trunk/fs/xfs/xfs_bmap.c index 3548c6f75593..85e7e327bcd8 100644 --- a/trunk/fs/xfs/xfs_bmap.c +++ b/trunk/fs/xfs/xfs_bmap.c @@ -5124,6 +5124,15 @@ xfs_bunmapi( cur->bc_private.b.flags = 0; } else cur = NULL; + + if (isrt) { + /* + * Synchronize by locking the bitmap inode. + */ + xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL); + xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL); + } + extno = 0; while (bno != (xfs_fileoff_t)-1 && bno >= start && lastx >= 0 && (nexts == 0 || extno < nexts)) { diff --git a/trunk/fs/xfs/xfs_rtalloc.c b/trunk/fs/xfs/xfs_rtalloc.c index 87323f1ded64..ca4f31534a0a 100644 --- a/trunk/fs/xfs/xfs_rtalloc.c +++ b/trunk/fs/xfs/xfs_rtalloc.c @@ -183,6 +183,7 @@ xfs_growfs_rt_alloc( oblocks = map.br_startoff + map.br_blockcount; } return 0; + error: return error; } @@ -2139,11 +2140,9 @@ xfs_rtfree_extent( xfs_buf_t *sumbp; /* summary file block buffer */ mp = tp->t_mountp; - /* - * Synchronize by locking the bitmap inode. - */ - xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL); - xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL); + + ASSERT(mp->m_rbmip->i_itemp != NULL); + ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL)); #if defined(__KERNEL__) && defined(DEBUG) /*