Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128415
b: refs/heads/master
c: 79c4458
h: refs/heads/master
i:
  128413: fdd3239
  128411: 1b30ad1
  128407: b43c9d1
  128399: 26ecb28
  128383: fe58e78
v: v3
  • Loading branch information
Chris Mason authored and David Woodhouse committed Jun 25, 2007
1 parent 751a172 commit 4763d7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: 4b2220da64727a1e31765ed4e17cd98f39749094
refs/heads/master: 79c44584ea346024e929ac0f2a3577aac33b7b3f
6 changes: 5 additions & 1 deletion trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ static int btrfs_unlink_trans(struct btrfs_trans_handle *trans,
btrfs_free_path(path);
if (!ret) {
dir->i_size -= name_len * 2;
dir->i_mtime = dir->i_ctime = CURRENT_TIME;
btrfs_update_inode(trans, root, dir);
drop_nlink(dentry->d_inode);
ret = btrfs_update_inode(trans, root, dentry->d_inode);
Expand Down Expand Up @@ -1037,6 +1038,7 @@ static int btrfs_add_link(struct btrfs_trans_handle *trans,
int ret;
struct btrfs_key key;
struct btrfs_root *root = BTRFS_I(dentry->d_parent->d_inode)->root;
struct inode *parent_inode;
key.objectid = inode->i_ino;
key.flags = 0;
btrfs_set_key_type(&key, BTRFS_INODE_ITEM_KEY);
Expand All @@ -1047,7 +1049,9 @@ static int btrfs_add_link(struct btrfs_trans_handle *trans,
dentry->d_parent->d_inode->i_ino,
&key, btrfs_inode_type(inode));
if (ret == 0) {
dentry->d_parent->d_inode->i_size += dentry->d_name.len * 2;
parent_inode = dentry->d_parent->d_inode;
parent_inode->i_size += dentry->d_name.len * 2;
parent_inode->i_mtime = parent_inode->i_ctime = CURRENT_TIME;
ret = btrfs_update_inode(trans, root,
dentry->d_parent->d_inode);
}
Expand Down

0 comments on commit 4763d7b

Please sign in to comment.