diff options
Diffstat (limited to 'fs/btrfs/dir-item.c')
-rw-r--r-- | fs/btrfs/dir-item.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c index c18f81797a88..18d3e168ad0a 100644 --- a/fs/btrfs/dir-item.c +++ b/fs/btrfs/dir-item.c | |||
@@ -35,6 +35,8 @@ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root | |||
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 | memcpy(name_ptr, name, name_len); |
38 | if (name_ptr + name_len > path.nodes[0]->b_data + 4096) | ||
39 | WARN_ON(1); | ||
38 | mark_buffer_dirty(path.nodes[0]); | 40 | mark_buffer_dirty(path.nodes[0]); |
39 | out: | 41 | out: |
40 | btrfs_release_path(root, &path); | 42 | btrfs_release_path(root, &path); |