]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_dir.c
[XFS] Make project quota enforcement return an error code consistent with
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_dir.c
index 7a708e993db685e89135963e927e97edf69c0d67..9cc702a839a35479b4c875bb806fb0ad72e4892f 100644 (file)
@@ -953,13 +953,13 @@ xfs_dir_node_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio,
                                break;
                        btree = &node->btree[0];
                        xfs_dir_trace_g_dun("node: node detail", dp, uio, node);
-                       for (i = 0; i < INT_GET(node->hdr.count, ARCH_CONVERT); btree++, i++) {
-                               if (INT_GET(btree->hashval, ARCH_CONVERT) >= cookhash) {
-                                       bno = INT_GET(btree->before, ARCH_CONVERT);
+                       for (i = 0; i < be16_to_cpu(node->hdr.count); btree++, i++) {
+                               if (be32_to_cpu(btree->hashval) >= cookhash) {
+                                       bno = be32_to_cpu(btree->before);
                                        break;
                                }
                        }
-                       if (i == INT_GET(node->hdr.count, ARCH_CONVERT)) {
+                       if (i == be16_to_cpu(node->hdr.count)) {
                                xfs_da_brelse(trans, bp);
                                xfs_dir_trace_g_du("node: hash beyond EOF",
                                                          dp, uio);
@@ -1118,7 +1118,7 @@ void
 xfs_dir_trace_g_dun(char *where, xfs_inode_t *dp, uio_t *uio,
                        xfs_da_intnode_t *node)
 {
-       int     last = INT_GET(node->hdr.count, ARCH_CONVERT) - 1;
+       int     last = be16_to_cpu(node->hdr.count) - 1;
 
        xfs_dir_trace_enter(XFS_DIR_KTRACE_G_DUN, where,
                     (void *)dp, (void *)dp->i_mount,
@@ -1127,11 +1127,11 @@ xfs_dir_trace_g_dun(char *where, xfs_inode_t *dp, uio_t *uio,
                     (void *)(unsigned long)uio->uio_resid,
                     (void *)(unsigned long)be32_to_cpu(node->hdr.info.forw),
                     (void *)(unsigned long)
-                       INT_GET(node->hdr.count, ARCH_CONVERT),
+                       be16_to_cpu(node->hdr.count),
                     (void *)(unsigned long)
-                       INT_GET(node->btree[0].hashval, ARCH_CONVERT),
+                       be32_to_cpu(node->btree[0].hashval),
                     (void *)(unsigned long)
-                       INT_GET(node->btree[last].hashval, ARCH_CONVERT),
+                       be32_to_cpu(node->btree[last].hashval),
                     NULL, NULL, NULL);
 }