mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 22:24:11 +08:00
switch statfs to fget_light/fput_light
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
bdc689594b
commit
0aa2ee5f0a
@ -87,11 +87,12 @@ int user_statfs(const char __user *pathname, struct kstatfs *st)
|
||||
|
||||
int fd_statfs(int fd, struct kstatfs *st)
|
||||
{
|
||||
struct file *file = fget(fd);
|
||||
int fput_needed;
|
||||
struct file *file = fget_light(fd, &fput_needed);
|
||||
int error = -EBADF;
|
||||
if (file) {
|
||||
error = vfs_statfs(&file->f_path, st);
|
||||
fput(file);
|
||||
fput_light(file, fput_needed);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user