Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255136
b: refs/heads/master
c: c2066e2
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig committed Jul 8, 2011
1 parent 3702141 commit dd95c55
Show file tree
Hide file tree
Showing 7 changed files with 237 additions and 232 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a64b04179735de6bfd9f00c130a68ed7f20d18ef
refs/heads/master: c2066e2662070e794f57a96a129c42575e77cfcb
11 changes: 4 additions & 7 deletions trunk/fs/xfs/xfs_da_btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2079,16 +2079,13 @@ xfs_da_do_buf(
* For read_buf, check the magic number.
*/
if (caller == 1) {
xfs_dir2_data_t *data;
xfs_dir2_free_t *free;
xfs_da_blkinfo_t *info;
xfs_dir2_data_hdr_t *hdr = rbp->data;
xfs_dir2_free_t *free = rbp->data;
xfs_da_blkinfo_t *info = rbp->data;
uint magic, magic1;

info = rbp->data;
data = rbp->data;
free = rbp->data;
magic = be16_to_cpu(info->magic);
magic1 = be32_to_cpu(data->hdr.magic);
magic1 = be32_to_cpu(hdr->magic);
if (unlikely(
XFS_TEST_ERROR((magic != XFS_DA_NODE_MAGIC) &&
(magic != XFS_ATTR_LEAF_MAGIC) &&
Expand Down
14 changes: 6 additions & 8 deletions trunk/fs/xfs/xfs_dir2_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ xfs_dir2_block_addname(
* This needs to happen before the next call to use_free.
*/
if (needscan) {
xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)hdr, &needlog);
xfs_dir2_data_freescan(mp, hdr, &needlog);
needscan = 0;
}
}
Expand Down Expand Up @@ -331,8 +331,7 @@ xfs_dir2_block_addname(
* This needs to happen before the next call to use_free.
*/
if (needscan) {
xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)hdr,
&needlog);
xfs_dir2_data_freescan(mp, hdr, &needlog);
needscan = 0;
}
/*
Expand Down Expand Up @@ -417,7 +416,7 @@ xfs_dir2_block_addname(
* Clean up the bestfree array and log the header, tail, and entry.
*/
if (needscan)
xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)hdr, &needlog);
xfs_dir2_data_freescan(mp, hdr, &needlog);
if (needlog)
xfs_dir2_data_log_header(tp, bp);
xfs_dir2_block_log_tail(tp, bp);
Expand Down Expand Up @@ -783,7 +782,7 @@ xfs_dir2_block_removename(
* Fix up bestfree, log the header if necessary.
*/
if (needscan)
xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)hdr, &needlog);
xfs_dir2_data_freescan(mp, hdr, &needlog);
if (needlog)
xfs_dir2_data_log_header(tp, bp);
xfs_dir2_data_check(dp, bp);
Expand Down Expand Up @@ -982,7 +981,7 @@ xfs_dir2_leaf_to_block(
* Scan the bestfree if we need it and log the data block header.
*/
if (needscan)
xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)hdr, &needlog);
xfs_dir2_data_freescan(mp, hdr, &needlog);
if (needlog)
xfs_dir2_data_log_header(tp, dbp);
/*
Expand Down Expand Up @@ -1177,8 +1176,7 @@ xfs_dir2_sf_to_block(
*xfs_dir2_data_unused_tag_p(dup) = cpu_to_be16(
((char *)dup - (char *)hdr));
xfs_dir2_data_log_unused(tp, bp, dup);
(void)xfs_dir2_data_freeinsert((xfs_dir2_data_t *)hdr,
dup, &dummy);
xfs_dir2_data_freeinsert(hdr, dup, &dummy);
offset += be16_to_cpu(dup->length);
continue;
}
Expand Down
Loading

0 comments on commit dd95c55

Please sign in to comment.