aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-04-23 01:58:54 -0400
committerBen Myers <bpm@sgi.com>2012-05-14 17:20:50 -0400
commita8acad70731e7d0585f25f33f8a009176f001f70 (patch)
tree07a14f8bde89e7947f56df7203530b7713b186ac /fs/xfs/xfs_inode.c
parent795cac72e902496adac399389f9affe5d1ab821a (diff)
xfs: kill XBF_LOCK
Buffers are always returned locked from the lookup routines. Hence we don't need to tell the lookup routines to return locked buffers, on to try and lock them. Remove XBF_LOCK from all the callers and from internal buffer cache usage. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 65d7d994d499..f64b482a7953 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -226,7 +226,7 @@ xfs_inotobp(
226 if (error) 226 if (error)
227 return error; 227 return error;
228 228
229 error = xfs_imap_to_bp(mp, tp, &imap, &bp, XBF_LOCK, imap_flags); 229 error = xfs_imap_to_bp(mp, tp, &imap, &bp, 0, imap_flags);
230 if (error) 230 if (error)
231 return error; 231 return error;
232 232
@@ -782,8 +782,7 @@ xfs_iread(
782 /* 782 /*
783 * Get pointers to the on-disk inode and the buffer containing it. 783 * Get pointers to the on-disk inode and the buffer containing it.
784 */ 784 */
785 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &bp, 785 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &bp, 0, iget_flags);
786 XBF_LOCK, iget_flags);
787 if (error) 786 if (error)
788 return error; 787 return error;
789 dip = (xfs_dinode_t *)xfs_buf_offset(bp, ip->i_imap.im_boffset); 788 dip = (xfs_dinode_t *)xfs_buf_offset(bp, ip->i_imap.im_boffset);
@@ -1342,7 +1341,7 @@ xfs_iunlink(
1342 * Here we put the head pointer into our next pointer, 1341 * Here we put the head pointer into our next pointer,
1343 * and then we fall through to point the head at us. 1342 * and then we fall through to point the head at us.
1344 */ 1343 */
1345 error = xfs_itobp(mp, tp, ip, &dip, &ibp, XBF_LOCK); 1344 error = xfs_itobp(mp, tp, ip, &dip, &ibp, 0);
1346 if (error) 1345 if (error)
1347 return error; 1346 return error;
1348 1347
@@ -1423,7 +1422,7 @@ xfs_iunlink_remove(
1423 * of dealing with the buffer when there is no need to 1422 * of dealing with the buffer when there is no need to
1424 * change it. 1423 * change it.
1425 */ 1424 */
1426 error = xfs_itobp(mp, tp, ip, &dip, &ibp, XBF_LOCK); 1425 error = xfs_itobp(mp, tp, ip, &dip, &ibp, 0);
1427 if (error) { 1426 if (error) {
1428 xfs_warn(mp, "%s: xfs_itobp() returned error %d.", 1427 xfs_warn(mp, "%s: xfs_itobp() returned error %d.",
1429 __func__, error); 1428 __func__, error);
@@ -1484,7 +1483,7 @@ xfs_iunlink_remove(
1484 * Now last_ibp points to the buffer previous to us on 1483 * Now last_ibp points to the buffer previous to us on
1485 * the unlinked list. Pull us from the list. 1484 * the unlinked list. Pull us from the list.
1486 */ 1485 */
1487 error = xfs_itobp(mp, tp, ip, &dip, &ibp, XBF_LOCK); 1486 error = xfs_itobp(mp, tp, ip, &dip, &ibp, 0);
1488 if (error) { 1487 if (error) {
1489 xfs_warn(mp, "%s: xfs_itobp(2) returned error %d.", 1488 xfs_warn(mp, "%s: xfs_itobp(2) returned error %d.",
1490 __func__, error); 1489 __func__, error);
@@ -1566,8 +1565,7 @@ xfs_ifree_cluster(
1566 * to mark all the active inodes on the buffer stale. 1565 * to mark all the active inodes on the buffer stale.
1567 */ 1566 */
1568 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno, 1567 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno,
1569 mp->m_bsize * blks_per_cluster, 1568 mp->m_bsize * blks_per_cluster, 0);
1570 XBF_LOCK);
1571 1569
1572 if (!bp) 1570 if (!bp)
1573 return ENOMEM; 1571 return ENOMEM;
@@ -1737,7 +1735,7 @@ xfs_ifree(
1737 1735
1738 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 1736 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
1739 1737
1740 error = xfs_itobp(ip->i_mount, tp, ip, &dip, &ibp, XBF_LOCK); 1738 error = xfs_itobp(ip->i_mount, tp, ip, &dip, &ibp, 0);
1741 if (error) 1739 if (error)
1742 return error; 1740 return error;
1743 1741