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
76fea00a
Commit
76fea00a
authored
Dec 13, 2007
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Add backrefs for symbolic link inodes
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
70b043f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
17 deletions
+13
-17
fs/btrfs/inode.c
fs/btrfs/inode.c
+13
-17
No files found.
fs/btrfs/inode.c
View file @
76fea00a
...
@@ -404,16 +404,14 @@ static int btrfs_unlink_trans(struct btrfs_trans_handle *trans,
...
@@ -404,16 +404,14 @@ static int btrfs_unlink_trans(struct btrfs_trans_handle *trans,
ret
=
btrfs_delete_one_dir_name
(
trans
,
root
,
path
,
di
);
ret
=
btrfs_delete_one_dir_name
(
trans
,
root
,
path
,
di
);
dentry
->
d_inode
->
i_ctime
=
dir
->
i_ctime
;
dentry
->
d_inode
->
i_ctime
=
dir
->
i_ctime
;
if
(
!
S_ISLNK
(
dentry
->
d_inode
->
i_mode
))
{
ret
=
btrfs_del_inode_ref
(
trans
,
root
,
name
,
name_len
,
ret
=
btrfs_del_inode_ref
(
trans
,
root
,
name
,
name_len
,
dentry
->
d_inode
->
i_ino
,
dentry
->
d_inode
->
i_ino
,
dentry
->
d_parent
->
d_inode
->
i_ino
);
dentry
->
d_parent
->
d_inode
->
i_ino
);
if
(
ret
)
{
if
(
ret
)
{
printk
(
"failed to delete reference to %.*s, "
printk
(
"failed to delete reference to %.*s, "
"inode %lu parent %lu
\n
"
,
name_len
,
name
,
"inode %lu parent %lu
\n
"
,
name_len
,
name
,
dentry
->
d_inode
->
i_ino
,
dentry
->
d_inode
->
i_ino
,
dentry
->
d_parent
->
d_inode
->
i_ino
);
dentry
->
d_parent
->
d_inode
->
i_ino
);
}
}
}
err:
err:
btrfs_free_path
(
path
);
btrfs_free_path
(
path
);
...
@@ -1293,13 +1291,11 @@ static int btrfs_add_link(struct btrfs_trans_handle *trans,
...
@@ -1293,13 +1291,11 @@ static int btrfs_add_link(struct btrfs_trans_handle *trans,
dentry
->
d_parent
->
d_inode
->
i_ino
,
dentry
->
d_parent
->
d_inode
->
i_ino
,
&
key
,
btrfs_inode_type
(
inode
));
&
key
,
btrfs_inode_type
(
inode
));
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
if
(
!
S_ISLNK
(
inode
->
i_mode
))
{
ret
=
btrfs_insert_inode_ref
(
trans
,
root
,
ret
=
btrfs_insert_inode_ref
(
trans
,
root
,
dentry
->
d_name
.
name
,
dentry
->
d_name
.
name
,
dentry
->
d_name
.
len
,
dentry
->
d_name
.
len
,
inode
->
i_ino
,
inode
->
i_ino
,
dentry
->
d_parent
->
d_inode
->
i_ino
);
dentry
->
d_parent
->
d_inode
->
i_ino
);
}
parent_inode
=
dentry
->
d_parent
->
d_inode
;
parent_inode
=
dentry
->
d_parent
->
d_inode
;
parent_inode
->
i_size
+=
dentry
->
d_name
.
len
*
2
;
parent_inode
->
i_size
+=
dentry
->
d_name
.
len
*
2
;
parent_inode
->
i_mtime
=
parent_inode
->
i_ctime
=
CURRENT_TIME
;
parent_inode
->
i_mtime
=
parent_inode
->
i_ctime
=
CURRENT_TIME
;
...
...
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