diff options
| author | David S. Miller <davem@davemloft.net> | 2011-12-06 21:10:05 -0500 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2011-12-06 21:10:05 -0500 | 
| commit | 959327c7842e8621e28b89acea7d57ff02b60972 (patch) | |
| tree | b00de195fa401186228796abdcd16812862fbf4d /fs/xfs/xfs_inode.c | |
| parent | f84ea779c25dabc90956f1c329e5e5c501ea96cc (diff) | |
| parent | b835c0f47f725d864bf2545f10c733b754bb6d51 (diff) | |
| download | olio-linux-3.10-959327c7842e8621e28b89acea7d57ff02b60972.tar.xz olio-linux-3.10-959327c7842e8621e28b89acea7d57ff02b60972.zip  | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'fs/xfs/xfs_inode.c')
| -rw-r--r-- | fs/xfs/xfs_inode.c | 21 | 
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index c0237c602f1..755ee816488 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -2835,6 +2835,27 @@ corrupt_out:  	return XFS_ERROR(EFSCORRUPTED);  } +void +xfs_promote_inode( +	struct xfs_inode	*ip) +{ +	struct xfs_buf		*bp; + +	ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_ILOCK_SHARED)); + +	bp = xfs_incore(ip->i_mount->m_ddev_targp, ip->i_imap.im_blkno, +			ip->i_imap.im_len, XBF_TRYLOCK); +	if (!bp) +		return; + +	if (XFS_BUF_ISDELAYWRITE(bp)) { +		xfs_buf_delwri_promote(bp); +		wake_up_process(ip->i_mount->m_ddev_targp->bt_task); +	} + +	xfs_buf_relse(bp); +} +  /*   * Return a pointer to the extent record at file index idx.   */  |