diff options
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r-- | fs/xfs/xfs_buf.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 24b4ebea0d4d..d083889535a2 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c | |||
@@ -44,8 +44,6 @@ | |||
44 | 44 | ||
45 | static kmem_zone_t *xfs_buf_zone; | 45 | static kmem_zone_t *xfs_buf_zone; |
46 | 46 | ||
47 | static struct workqueue_struct *xfslogd_workqueue; | ||
48 | |||
49 | #ifdef XFS_BUF_LOCK_TRACKING | 47 | #ifdef XFS_BUF_LOCK_TRACKING |
50 | # define XB_SET_OWNER(bp) ((bp)->b_last_holder = current->pid) | 48 | # define XB_SET_OWNER(bp) ((bp)->b_last_holder = current->pid) |
51 | # define XB_CLEAR_OWNER(bp) ((bp)->b_last_holder = -1) | 49 | # define XB_CLEAR_OWNER(bp) ((bp)->b_last_holder = -1) |
@@ -463,7 +461,7 @@ _xfs_buf_find( | |||
463 | * have to check that the buffer falls within the filesystem bounds. | 461 | * have to check that the buffer falls within the filesystem bounds. |
464 | */ | 462 | */ |
465 | eofs = XFS_FSB_TO_BB(btp->bt_mount, btp->bt_mount->m_sb.sb_dblocks); | 463 | eofs = XFS_FSB_TO_BB(btp->bt_mount, btp->bt_mount->m_sb.sb_dblocks); |
466 | if (blkno >= eofs) { | 464 | if (blkno < 0 || blkno >= eofs) { |
467 | /* | 465 | /* |
468 | * XXX (dgc): we should really be returning -EFSCORRUPTED here, | 466 | * XXX (dgc): we should really be returning -EFSCORRUPTED here, |
469 | * but none of the higher level infrastructure supports | 467 | * but none of the higher level infrastructure supports |
@@ -1053,7 +1051,7 @@ xfs_buf_ioend_async( | |||
1053 | struct xfs_buf *bp) | 1051 | struct xfs_buf *bp) |
1054 | { | 1052 | { |
1055 | INIT_WORK(&bp->b_iodone_work, xfs_buf_ioend_work); | 1053 | INIT_WORK(&bp->b_iodone_work, xfs_buf_ioend_work); |
1056 | queue_work(xfslogd_workqueue, &bp->b_iodone_work); | 1054 | queue_work(bp->b_target->bt_mount->m_buf_workqueue, &bp->b_iodone_work); |
1057 | } | 1055 | } |
1058 | 1056 | ||
1059 | void | 1057 | void |
@@ -1882,15 +1880,8 @@ xfs_buf_init(void) | |||
1882 | if (!xfs_buf_zone) | 1880 | if (!xfs_buf_zone) |
1883 | goto out; | 1881 | goto out; |
1884 | 1882 | ||
1885 | xfslogd_workqueue = alloc_workqueue("xfslogd", | ||
1886 | WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_FREEZABLE, 1); | ||
1887 | if (!xfslogd_workqueue) | ||
1888 | goto out_free_buf_zone; | ||
1889 | |||
1890 | return 0; | 1883 | return 0; |
1891 | 1884 | ||
1892 | out_free_buf_zone: | ||
1893 | kmem_zone_destroy(xfs_buf_zone); | ||
1894 | out: | 1885 | out: |
1895 | return -ENOMEM; | 1886 | return -ENOMEM; |
1896 | } | 1887 | } |
@@ -1898,6 +1889,5 @@ xfs_buf_init(void) | |||
1898 | void | 1889 | void |
1899 | xfs_buf_terminate(void) | 1890 | xfs_buf_terminate(void) |
1900 | { | 1891 | { |
1901 | destroy_workqueue(xfslogd_workqueue); | ||
1902 | kmem_zone_destroy(xfs_buf_zone); | 1892 | kmem_zone_destroy(xfs_buf_zone); |
1903 | } | 1893 | } |