Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
9d95afd5
Commit
9d95afd5
authored
Mar 01, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kill dentry_unhash()
the last user is gone Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
f8b31710
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
30 deletions
+0
-30
fs/namei.c
fs/namei.c
+0
-25
include/linux/fs.h
include/linux/fs.h
+0
-5
No files found.
fs/namei.c
View file @
9d95afd5
...
...
@@ -3685,31 +3685,6 @@ SYSCALL_DEFINE2(mkdir, const char __user *, pathname, umode_t, mode)
return
sys_mkdirat
(
AT_FDCWD
,
pathname
,
mode
);
}
/*
* The dentry_unhash() helper will try to drop the dentry early: we
* should have a usage count of 1 if we're the only user of this
* dentry, and if that is true (possibly after pruning the dcache),
* then we drop the dentry now.
*
* A low-level filesystem can, if it choses, legally
* do a
*
* if (!d_unhashed(dentry))
* return -EBUSY;
*
* if it cannot handle the case of removing a directory
* that is still in use by something else..
*/
void
dentry_unhash
(
struct
dentry
*
dentry
)
{
shrink_dcache_parent
(
dentry
);
spin_lock
(
&
dentry
->
d_lock
);
if
(
dentry
->
d_lockref
.
count
==
1
)
__d_drop
(
dentry
);
spin_unlock
(
&
dentry
->
d_lock
);
}
EXPORT_SYMBOL
(
dentry_unhash
);
int
vfs_rmdir
(
struct
inode
*
dir
,
struct
dentry
*
dentry
)
{
int
error
=
may_delete
(
dir
,
dentry
,
1
);
...
...
include/linux/fs.h
View file @
9d95afd5
...
...
@@ -1539,11 +1539,6 @@ extern int vfs_unlink(struct inode *, struct dentry *, struct inode **);
extern
int
vfs_rename
(
struct
inode
*
,
struct
dentry
*
,
struct
inode
*
,
struct
dentry
*
,
struct
inode
**
,
unsigned
int
);
extern
int
vfs_whiteout
(
struct
inode
*
,
struct
dentry
*
);
/*
* VFS dentry helper functions.
*/
extern
void
dentry_unhash
(
struct
dentry
*
dentry
);
/*
* VFS file helper functions.
*/
...
...
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