diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-29 15:15:27 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-29 15:15:27 -0400 |
commit | f254e52c1ce550fdaa0d31f5e068f0d67c2485d4 (patch) | |
tree | 1232b7e16b6f0b1b1b150c5df396452cac5e3853 /fs/btrfs/ctree.c | |
parent | 75dfe3960e602e63ea42ac7a2a0520832b189ffa (diff) | |
download | lwn-f254e52c1ce550fdaa0d31f5e068f0d67c2485d4.tar.gz lwn-f254e52c1ce550fdaa0d31f5e068f0d67c2485d4.zip |
Btrfs: verify csums on read
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 48c611948d11..1eb333e2e18b 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -109,14 +109,14 @@ static int comp_keys(struct btrfs_disk_key *disk, struct btrfs_key *k2) return 1; if (k1.objectid < k2->objectid) return -1; - if (k1.flags > k2->flags) - return 1; - if (k1.flags < k2->flags) - return -1; if (k1.offset > k2->offset) return 1; if (k1.offset < k2->offset) return -1; + if (k1.flags > k2->flags) + return 1; + if (k1.flags < k2->flags) + return -1; return 0; } @@ -1165,7 +1165,6 @@ int btrfs_insert_empty_item(struct btrfs_trans_handle *trans, struct btrfs_root BUG(); ret = btrfs_search_slot(trans, root, cpu_key, path, data_size, 1); if (ret == 0) { - btrfs_release_path(root, path); return -EEXIST; } if (ret < 0) |