aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.h5
-rw-r--r--fs/xfs/linux-2.6/xfs_sync.c2
-rw-r--r--fs/xfs/quota/xfs_dquot.c4
-rw-r--r--fs/xfs/xfs_buf_item.c2
-rw-r--r--fs/xfs/xfs_inode.c2
6 files changed, 10 insertions, 7 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 6a42f71d08aa..5e929f0e57f7 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -1677,7 +1677,7 @@ xfs_buf_delwri_split(
1677 list_for_each_entry_safe(bp, n, dwq, b_list) { 1677 list_for_each_entry_safe(bp, n, dwq, b_list) {
1678 ASSERT(bp->b_flags & XBF_DELWRI); 1678 ASSERT(bp->b_flags & XBF_DELWRI);
1679 1679
1680 if (!XFS_BUF_ISPINNED(bp) && xfs_buf_trylock(bp)) { 1680 if (!xfs_buf_ispinned(bp) && xfs_buf_trylock(bp)) {
1681 if (!force && 1681 if (!force &&
1682 time_before(jiffies, bp->b_queuetime + age)) { 1682 time_before(jiffies, bp->b_queuetime + age)) {
1683 xfs_buf_unlock(bp); 1683 xfs_buf_unlock(bp);
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
index c5601e1e0f46..f4e3de65ebe7 100644
--- a/fs/xfs/linux-2.6/xfs_buf.h
+++ b/fs/xfs/linux-2.6/xfs_buf.h
@@ -285,7 +285,10 @@ xfs_buf_set_ref(
285#define XFS_BUF_SET_VTYPE_REF(bp, type, ref) xfs_buf_set_ref(bp, ref) 285#define XFS_BUF_SET_VTYPE_REF(bp, type, ref) xfs_buf_set_ref(bp, ref)
286#define XFS_BUF_SET_VTYPE(bp, type) do { } while (0) 286#define XFS_BUF_SET_VTYPE(bp, type) do { } while (0)
287 287
288#define XFS_BUF_ISPINNED(bp) atomic_read(&((bp)->b_pin_count)) 288static inline int xfs_buf_ispinned(struct xfs_buf *bp)
289{
290 return atomic_read(&bp->b_pin_count);
291}
289 292
290#define XFS_BUF_FINISH_IOWAIT(bp) complete(&bp->b_iowait); 293#define XFS_BUF_FINISH_IOWAIT(bp) complete(&bp->b_iowait);
291 294
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c
index 5cc158e52d4c..a8500e92ae72 100644
--- a/fs/xfs/linux-2.6/xfs_sync.c
+++ b/fs/xfs/linux-2.6/xfs_sync.c
@@ -330,7 +330,7 @@ xfs_sync_fsdata(
330 * between there and here. 330 * between there and here.
331 */ 331 */
332 bp = xfs_getsb(mp, 0); 332 bp = xfs_getsb(mp, 0);
333 if (XFS_BUF_ISPINNED(bp)) 333 if (xfs_buf_ispinned(bp))
334 xfs_log_force(mp, 0); 334 xfs_log_force(mp, 0);
335 335
336 return xfs_bwrite(mp, bp); 336 return xfs_bwrite(mp, bp);
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c
index 2e0629265f67..db62959bed13 100644
--- a/fs/xfs/quota/xfs_dquot.c
+++ b/fs/xfs/quota/xfs_dquot.c
@@ -1236,7 +1236,7 @@ xfs_qm_dqflush(
1236 * If the buffer is pinned then push on the log so we won't 1236 * If the buffer is pinned then push on the log so we won't
1237 * get stuck waiting in the write for too long. 1237 * get stuck waiting in the write for too long.
1238 */ 1238 */
1239 if (XFS_BUF_ISPINNED(bp)) { 1239 if (xfs_buf_ispinned(bp)) {
1240 trace_xfs_dqflush_force(dqp); 1240 trace_xfs_dqflush_force(dqp);
1241 xfs_log_force(mp, 0); 1241 xfs_log_force(mp, 0);
1242 } 1242 }
@@ -1443,7 +1443,7 @@ xfs_qm_dqflock_pushbuf_wait(
1443 goto out_lock; 1443 goto out_lock;
1444 1444
1445 if (XFS_BUF_ISDELAYWRITE(bp)) { 1445 if (XFS_BUF_ISDELAYWRITE(bp)) {
1446 if (XFS_BUF_ISPINNED(bp)) 1446 if (xfs_buf_ispinned(bp))
1447 xfs_log_force(mp, 0); 1447 xfs_log_force(mp, 0);
1448 xfs_buf_delwri_promote(bp); 1448 xfs_buf_delwri_promote(bp);
1449 wake_up_process(bp->b_target->bt_task); 1449 wake_up_process(bp->b_target->bt_task);
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index a16c24c3a3dd..a3d2bbca26c7 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -478,7 +478,7 @@ xfs_buf_item_trylock(
478 struct xfs_buf_log_item *bip = BUF_ITEM(lip); 478 struct xfs_buf_log_item *bip = BUF_ITEM(lip);
479 struct xfs_buf *bp = bip->bli_buf; 479 struct xfs_buf *bp = bip->bli_buf;
480 480
481 if (XFS_BUF_ISPINNED(bp)) 481 if (xfs_buf_ispinned(bp))
482 return XFS_ITEM_PINNED; 482 return XFS_ITEM_PINNED;
483 if (!xfs_buf_trylock(bp)) 483 if (!xfs_buf_trylock(bp))
484 return XFS_ITEM_LOCKED; 484 return XFS_ITEM_LOCKED;
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index bdb47b22c6bc..76ee2c5371ca 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -2585,7 +2585,7 @@ xfs_iflush(
2585 * If the buffer is pinned then push on the log now so we won't 2585 * If the buffer is pinned then push on the log now so we won't
2586 * get stuck waiting in the write for too long. 2586 * get stuck waiting in the write for too long.
2587 */ 2587 */
2588 if (XFS_BUF_ISPINNED(bp)) 2588 if (xfs_buf_ispinned(bp))
2589 xfs_log_force(mp, 0); 2589 xfs_log_force(mp, 0);
2590 2590
2591 /* 2591 /*