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
Kirill Smelkov
linux
Commits
7449af1e
Commit
7449af1e
authored
Apr 21, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch xattr syscalls to fget_light/fput_light
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
863ced7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
fs/xattr.c
fs/xattr.c
+12
-8
No files found.
fs/xattr.c
View file @
7449af1e
...
...
@@ -399,11 +399,12 @@ SYSCALL_DEFINE5(lsetxattr, const char __user *, pathname,
SYSCALL_DEFINE5
(
fsetxattr
,
int
,
fd
,
const
char
__user
*
,
name
,
const
void
__user
*
,
value
,
size_t
,
size
,
int
,
flags
)
{
int
fput_needed
;
struct
file
*
f
;
struct
dentry
*
dentry
;
int
error
=
-
EBADF
;
f
=
fget
(
f
d
);
f
=
fget
_light
(
fd
,
&
fput_neede
d
);
if
(
!
f
)
return
error
;
dentry
=
f
->
f_path
.
dentry
;
...
...
@@ -413,7 +414,7 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
error
=
setxattr
(
dentry
,
name
,
value
,
size
,
flags
);
mnt_drop_write_file
(
f
);
}
fput
(
f
);
fput
_light
(
f
,
fput_needed
);
return
error
;
}
...
...
@@ -486,15 +487,16 @@ SYSCALL_DEFINE4(lgetxattr, const char __user *, pathname,
SYSCALL_DEFINE4
(
fgetxattr
,
int
,
fd
,
const
char
__user
*
,
name
,
void
__user
*
,
value
,
size_t
,
size
)
{
int
fput_needed
;
struct
file
*
f
;
ssize_t
error
=
-
EBADF
;
f
=
fget
(
f
d
);
f
=
fget
_light
(
fd
,
&
fput_neede
d
);
if
(
!
f
)
return
error
;
audit_inode
(
NULL
,
f
->
f_path
.
dentry
);
error
=
getxattr
(
f
->
f_path
.
dentry
,
name
,
value
,
size
);
fput
(
f
);
fput
_light
(
f
,
fput_needed
);
return
error
;
}
...
...
@@ -566,15 +568,16 @@ SYSCALL_DEFINE3(llistxattr, const char __user *, pathname, char __user *, list,
SYSCALL_DEFINE3
(
flistxattr
,
int
,
fd
,
char
__user
*
,
list
,
size_t
,
size
)
{
int
fput_needed
;
struct
file
*
f
;
ssize_t
error
=
-
EBADF
;
f
=
fget
(
f
d
);
f
=
fget
_light
(
fd
,
&
fput_neede
d
);
if
(
!
f
)
return
error
;
audit_inode
(
NULL
,
f
->
f_path
.
dentry
);
error
=
listxattr
(
f
->
f_path
.
dentry
,
list
,
size
);
fput
(
f
);
fput
_light
(
f
,
fput_needed
);
return
error
;
}
...
...
@@ -634,11 +637,12 @@ SYSCALL_DEFINE2(lremovexattr, const char __user *, pathname,
SYSCALL_DEFINE2
(
fremovexattr
,
int
,
fd
,
const
char
__user
*
,
name
)
{
int
fput_needed
;
struct
file
*
f
;
struct
dentry
*
dentry
;
int
error
=
-
EBADF
;
f
=
fget
(
f
d
);
f
=
fget
_light
(
fd
,
&
fput_neede
d
);
if
(
!
f
)
return
error
;
dentry
=
f
->
f_path
.
dentry
;
...
...
@@ -648,7 +652,7 @@ SYSCALL_DEFINE2(fremovexattr, int, fd, const char __user *, name)
error
=
removexattr
(
dentry
,
name
);
mnt_drop_write_file
(
f
);
}
fput
(
f
);
fput
_light
(
f
,
fput_needed
);
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