diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-30 14:27:56 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-30 14:27:56 -0400 |
commit | d6025579531b7ea170ba283b171ff7a6bf7d0e12 (patch) | |
tree | c3b742fda3a6ac8541c06011bb3c26635db99212 /fs/btrfs/dir-item.c | |
parent | 22b0ebda6c63a1ad66b6a9e806bd226a4a03a049 (diff) |
Btrfs: corruption hunt continues
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/dir-item.c')
-rw-r--r-- | fs/btrfs/dir-item.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c index 18d3e168ad0a..f55c89472ac0 100644 --- a/fs/btrfs/dir-item.c +++ b/fs/btrfs/dir-item.c | |||
@@ -34,10 +34,8 @@ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root | |||
34 | btrfs_set_dir_flags(dir_item, 0); | 34 | btrfs_set_dir_flags(dir_item, 0); |
35 | btrfs_set_dir_name_len(dir_item, name_len); | 35 | btrfs_set_dir_name_len(dir_item, name_len); |
36 | name_ptr = (char *)(dir_item + 1); | 36 | name_ptr = (char *)(dir_item + 1); |
37 | memcpy(name_ptr, name, name_len); | 37 | btrfs_memcpy(root, path.nodes[0]->b_data, name_ptr, name, name_len); |
38 | if (name_ptr + name_len > path.nodes[0]->b_data + 4096) | 38 | btrfs_mark_buffer_dirty(path.nodes[0]); |
39 | WARN_ON(1); | ||
40 | mark_buffer_dirty(path.nodes[0]); | ||
41 | out: | 39 | out: |
42 | btrfs_release_path(root, &path); | 40 | btrfs_release_path(root, &path); |
43 | return ret; | 41 | return ret; |