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
f7bb959d
Commit
f7bb959d
authored
Mar 05, 2020
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
open_last_lookups(): consolidate fsnotify_create() calls
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
c5971b8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
fs/namei.c
fs/namei.c
+2
-5
No files found.
fs/namei.c
View file @
f7bb959d
...
...
@@ -2957,8 +2957,6 @@ static struct dentry *atomic_open(struct nameidata *nd, struct dentry *dentry,
dput
(
dentry
);
dentry
=
dget
(
file
->
f_path
.
dentry
);
}
if
(
file
->
f_mode
&
FMODE_CREATED
)
fsnotify_create
(
dir
,
dentry
);
}
else
if
(
WARN_ON
(
file
->
f_path
.
dentry
==
DENTRY_NOT_SET
))
{
error
=
-
EIO
;
}
else
{
...
...
@@ -2966,8 +2964,6 @@ static struct dentry *atomic_open(struct nameidata *nd, struct dentry *dentry,
dput
(
dentry
);
dentry
=
file
->
f_path
.
dentry
;
}
if
(
file
->
f_mode
&
FMODE_CREATED
)
fsnotify_create
(
dir
,
dentry
);
if
(
unlikely
(
d_is_negative
(
dentry
)))
error
=
-
ENOENT
;
}
...
...
@@ -3103,7 +3099,6 @@ static struct dentry *lookup_open(struct nameidata *nd, struct file *file,
open_flag
&
O_EXCL
);
if
(
error
)
goto
out_dput
;
fsnotify_create
(
dir_inode
,
dentry
);
}
if
(
unlikely
(
create_error
)
&&
!
dentry
->
d_inode
)
{
error
=
create_error
;
...
...
@@ -3182,6 +3177,8 @@ static const char *open_last_lookups(struct nameidata *nd,
else
inode_lock_shared
(
dir
->
d_inode
);
dentry
=
lookup_open
(
nd
,
file
,
op
,
got_write
);
if
(
!
IS_ERR
(
dentry
)
&&
(
file
->
f_mode
&
FMODE_CREATED
))
fsnotify_create
(
dir
->
d_inode
,
dentry
);
if
(
open_flag
&
O_CREAT
)
inode_unlock
(
dir
->
d_inode
);
else
...
...
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