projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cc58cf
)
Btrfs: Make sure to cow the root during a snapshot
author
Chris Mason
<chris.mason@oracle.com>
Mon, 27 Aug 2007 20:49:44 +0000
(16:49 -0400)
committer
David Woodhouse
<dwmw2@hera.kernel.org>
Mon, 27 Aug 2007 20:49:44 +0000
(16:49 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/inode.c
b/fs/btrfs/inode.c
index 7e4cf62ada5ad324105f240de94e99d41e3a9025..504d37dfa6c90a1ae9084f11adfb3447e926235c 100644
(file)
--- a/
fs/btrfs/inode.c
+++ b/
fs/btrfs/inode.c
@@
-2096,6
+2096,7
@@
static int create_snapshot(struct btrfs_root *root, char *name, int namelen)
struct btrfs_trans_handle *trans;
struct btrfs_key key;
struct btrfs_root_item new_root_item;
+ struct buffer_head *tmp;
int ret;
int err;
u64 objectid;
@@
-2123,6
+2124,7
@@
static int create_snapshot(struct btrfs_root *root, char *name, int namelen)
key.offset = 1;
key.flags = 0;
btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY);
+ btrfs_cow_block(trans, root, root->node, NULL, 0, &tmp);
btrfs_set_root_blocknr(&new_root_item, bh_blocknr(root->node));
ret = btrfs_insert_root(trans, root->fs_info->tree_root, &key,