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
d6483b7a
Commit
d6483b7a
authored
Aug 26, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch fchmod(2) to fget_light()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
6b48c5b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
fs/open.c
fs/open.c
+5
-7
No files found.
fs/open.c
View file @
d6483b7a
...
...
@@ -582,23 +582,21 @@ SYSCALL_DEFINE3(lchown, const char __user *, filename, uid_t, user, gid_t, group
SYSCALL_DEFINE3
(
fchown
,
unsigned
int
,
fd
,
uid_t
,
user
,
gid_t
,
group
)
{
struct
file
*
file
;
int
error
=
-
EBADF
;
struct
dentry
*
dentry
;
struct
file
*
file
;
int
error
=
-
EBADF
,
fput_needed
;
file
=
fget
(
f
d
);
file
=
fget
_light
(
fd
,
&
fput_neede
d
);
if
(
!
file
)
goto
out
;
error
=
mnt_want_write_file
(
file
);
if
(
error
)
goto
out_fput
;
dentry
=
file
->
f_path
.
dentry
;
audit_inode
(
NULL
,
dentry
);
audit_inode
(
NULL
,
file
->
f_path
.
dentry
);
error
=
chown_common
(
&
file
->
f_path
,
user
,
group
);
mnt_drop_write_file
(
file
);
out_fput:
fput
(
file
);
fput
_light
(
file
,
fput_needed
);
out:
return
error
;
}
...
...
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