aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c1
-rw-r--r--fs/xfs/quota/xfs_qm.c11
-rw-r--r--fs/xfs/xfs_rtalloc.c29
4 files changed, 21 insertions, 22 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index 8f2beec526cf..74d8be87f983 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -540,7 +540,7 @@ xfs_probe_cluster(
540 540
541 /* First sum forwards in this page */ 541 /* First sum forwards in this page */
542 do { 542 do {
543 if (mapped != buffer_mapped(bh)) 543 if (!buffer_uptodate(bh) || (mapped != buffer_mapped(bh)))
544 return total; 544 return total;
545 total += bh->b_size; 545 total += bh->b_size;
546 } while ((bh = bh->b_this_page) != head); 546 } while ((bh = bh->b_this_page) != head);
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index bfb4f2917bb6..8cdfa4151659 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -29,6 +29,7 @@
29#include <linux/blkdev.h> 29#include <linux/blkdev.h>
30#include <linux/hash.h> 30#include <linux/hash.h>
31#include <linux/kthread.h> 31#include <linux/kthread.h>
32#include <linux/migrate.h>
32#include "xfs_linux.h" 33#include "xfs_linux.h"
33 34
34STATIC kmem_zone_t *xfs_buf_zone; 35STATIC kmem_zone_t *xfs_buf_zone;
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 53a00fb217fa..7c0e39dc6189 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -68,6 +68,9 @@ kmem_zone_t *qm_dqzone;
68kmem_zone_t *qm_dqtrxzone; 68kmem_zone_t *qm_dqtrxzone;
69STATIC kmem_shaker_t xfs_qm_shaker; 69STATIC kmem_shaker_t xfs_qm_shaker;
70 70
71STATIC cred_t xfs_zerocr;
72STATIC xfs_inode_t xfs_zeroino;
73
71STATIC void xfs_qm_list_init(xfs_dqlist_t *, char *, int); 74STATIC void xfs_qm_list_init(xfs_dqlist_t *, char *, int);
72STATIC void xfs_qm_list_destroy(xfs_dqlist_t *); 75STATIC void xfs_qm_list_destroy(xfs_dqlist_t *);
73 76
@@ -1393,8 +1396,6 @@ xfs_qm_qino_alloc(
1393 xfs_trans_t *tp; 1396 xfs_trans_t *tp;
1394 int error; 1397 int error;
1395 unsigned long s; 1398 unsigned long s;
1396 cred_t zerocr;
1397 xfs_inode_t zeroino;
1398 int committed; 1399 int committed;
1399 1400
1400 tp = xfs_trans_alloc(mp, XFS_TRANS_QM_QINOCREATE); 1401 tp = xfs_trans_alloc(mp, XFS_TRANS_QM_QINOCREATE);
@@ -1406,11 +1407,9 @@ xfs_qm_qino_alloc(
1406 xfs_trans_cancel(tp, 0); 1407 xfs_trans_cancel(tp, 0);
1407 return error; 1408 return error;
1408 } 1409 }
1409 memset(&zerocr, 0, sizeof(zerocr));
1410 memset(&zeroino, 0, sizeof(zeroino));
1411 1410
1412 if ((error = xfs_dir_ialloc(&tp, &zeroino, S_IFREG, 1, 0, 1411 if ((error = xfs_dir_ialloc(&tp, &xfs_zeroino, S_IFREG, 1, 0,
1413 &zerocr, 0, 1, ip, &committed))) { 1412 &xfs_zerocr, 0, 1, ip, &committed))) {
1414 xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES | 1413 xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES |
1415 XFS_TRANS_ABORT); 1414 XFS_TRANS_ABORT);
1416 return error; 1415 return error;
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index 06fc061c50fc..5b413946b1c5 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -130,7 +130,8 @@ xfs_growfs_rt_alloc(
130 /* 130 /*
131 * Lock the inode. 131 * Lock the inode.
132 */ 132 */
133 if ((error = xfs_trans_iget(mp, tp, ino, 0, XFS_ILOCK_EXCL, &ip))) 133 if ((error = xfs_trans_iget(mp, tp, ino, 0,
134 XFS_ILOCK_EXCL, &ip)))
134 goto error_exit; 135 goto error_exit;
135 XFS_BMAP_INIT(&flist, &firstblock); 136 XFS_BMAP_INIT(&flist, &firstblock);
136 /* 137 /*
@@ -170,8 +171,8 @@ xfs_growfs_rt_alloc(
170 /* 171 /*
171 * Lock the bitmap inode. 172 * Lock the bitmap inode.
172 */ 173 */
173 if ((error = xfs_trans_iget(mp, tp, ino, 0, XFS_ILOCK_EXCL, 174 if ((error = xfs_trans_iget(mp, tp, ino, 0,
174 &ip))) 175 XFS_ILOCK_EXCL, &ip)))
175 goto error_exit; 176 goto error_exit;
176 /* 177 /*
177 * Get a buffer for the block. 178 * Get a buffer for the block.
@@ -2023,8 +2024,8 @@ xfs_growfs_rt(
2023 /* 2024 /*
2024 * Lock out other callers by grabbing the bitmap inode lock. 2025 * Lock out other callers by grabbing the bitmap inode lock.
2025 */ 2026 */
2026 if ((error = xfs_trans_iget(mp, tp, 0, mp->m_sb.sb_rbmino, 2027 if ((error = xfs_trans_iget(mp, tp, mp->m_sb.sb_rbmino, 0,
2027 XFS_ILOCK_EXCL, &ip))) 2028 XFS_ILOCK_EXCL, &ip)))
2028 goto error_exit; 2029 goto error_exit;
2029 ASSERT(ip == mp->m_rbmip); 2030 ASSERT(ip == mp->m_rbmip);
2030 /* 2031 /*
@@ -2037,8 +2038,8 @@ xfs_growfs_rt(
2037 /* 2038 /*
2038 * Get the summary inode into the transaction. 2039 * Get the summary inode into the transaction.
2039 */ 2040 */
2040 if ((error = xfs_trans_iget(mp, tp, mp->m_sb.sb_rsumino, 2041 if ((error = xfs_trans_iget(mp, tp, mp->m_sb.sb_rsumino, 0,
2041 0, XFS_ILOCK_EXCL, &ip))) 2042 XFS_ILOCK_EXCL, &ip)))
2042 goto error_exit; 2043 goto error_exit;
2043 ASSERT(ip == mp->m_rsumip); 2044 ASSERT(ip == mp->m_rsumip);
2044 /* 2045 /*
@@ -2158,10 +2159,9 @@ xfs_rtallocate_extent(
2158 /* 2159 /*
2159 * Lock out other callers by grabbing the bitmap inode lock. 2160 * Lock out other callers by grabbing the bitmap inode lock.
2160 */ 2161 */
2161 error = xfs_trans_iget(mp, tp, mp->m_sb.sb_rbmino, 0, XFS_ILOCK_EXCL, &ip); 2162 if ((error = xfs_trans_iget(mp, tp, mp->m_sb.sb_rbmino, 0,
2162 if (error) { 2163 XFS_ILOCK_EXCL, &ip)))
2163 return error; 2164 return error;
2164 }
2165 sumbp = NULL; 2165 sumbp = NULL;
2166 /* 2166 /*
2167 * Allocate by size, or near another block, or exactly at some block. 2167 * Allocate by size, or near another block, or exactly at some block.
@@ -2221,10 +2221,9 @@ xfs_rtfree_extent(
2221 /* 2221 /*
2222 * Synchronize by locking the bitmap inode. 2222 * Synchronize by locking the bitmap inode.
2223 */ 2223 */
2224 error = xfs_trans_iget(mp, tp, mp->m_sb.sb_rbmino, 0, XFS_ILOCK_EXCL, &ip); 2224 if ((error = xfs_trans_iget(mp, tp, mp->m_sb.sb_rbmino, 0,
2225 if (error) { 2225 XFS_ILOCK_EXCL, &ip)))
2226 return error; 2226 return error;
2227 }
2228#if defined(__KERNEL__) && defined(DEBUG) 2227#if defined(__KERNEL__) && defined(DEBUG)
2229 /* 2228 /*
2230 * Check to see that this whole range is currently allocated. 2229 * Check to see that this whole range is currently allocated.
@@ -2365,8 +2364,8 @@ xfs_rtpick_extent(
2365 __uint64_t seq; /* sequence number of file creation */ 2364 __uint64_t seq; /* sequence number of file creation */
2366 __uint64_t *seqp; /* pointer to seqno in inode */ 2365 __uint64_t *seqp; /* pointer to seqno in inode */
2367 2366
2368 error = xfs_trans_iget(mp, tp, mp->m_sb.sb_rbmino, 0, XFS_ILOCK_EXCL, &ip); 2367 if ((error = xfs_trans_iget(mp, tp, mp->m_sb.sb_rbmino, 0,
2369 if (error) 2368 XFS_ILOCK_EXCL, &ip)))
2370 return error; 2369 return error;
2371 ASSERT(ip == mp->m_rbmip); 2370 ASSERT(ip == mp->m_rbmip);
2372 seqp = (__uint64_t *)&ip->i_d.di_atime; 2371 seqp = (__uint64_t *)&ip->i_d.di_atime;