Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
79c44584
Commit
79c44584
authored
Jun 25, 2007
by
Chris Mason
Committed by
David Woodhouse
Jun 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Fix mtime and ctime updates on parent dirs
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
4b2220da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
fs/btrfs/inode.c
fs/btrfs/inode.c
+5
-1
No files found.
fs/btrfs/inode.c
View file @
79c44584
...
...
@@ -250,6 +250,7 @@ err:
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
);
...
...
@@ -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
);
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment