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
bec1052e
Commit
bec1052e
authored
Mar 03, 2010
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set S_DEAD on unlink() and non-directory rename() victims
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
db1f05bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
fs/namei.c
fs/namei.c
+6
-1
No files found.
fs/namei.c
View file @
bec1052e
...
...
@@ -2262,8 +2262,11 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry)
error
=
-
EBUSY
;
else
{
error
=
security_inode_unlink
(
dir
,
dentry
);
if
(
!
error
)
if
(
!
error
)
{
error
=
dir
->
i_op
->
unlink
(
dir
,
dentry
);
if
(
!
error
)
dentry
->
d_inode
->
i_flags
|=
S_DEAD
;
}
}
mutex_unlock
(
&
dentry
->
d_inode
->
i_mutex
);
...
...
@@ -2616,6 +2619,8 @@ static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
else
error
=
old_dir
->
i_op
->
rename
(
old_dir
,
old_dentry
,
new_dir
,
new_dentry
);
if
(
!
error
)
{
if
(
target
)
target
->
i_flags
|=
S_DEAD
;
if
(
!
(
old_dir
->
i_sb
->
s_type
->
fs_flags
&
FS_RENAME_DOES_D_MOVE
))
d_move
(
old_dentry
,
new_dentry
);
}
...
...
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