浏览代码

switch statfs to fget_light/fput_light

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 13 年之前
父节点
当前提交
0aa2ee5f0a
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      fs/statfs.c

+ 3 - 2
fs/statfs.c

@@ -87,11 +87,12 @@ int user_statfs(const char __user *pathname, struct kstatfs *st)
 
 
 int fd_statfs(int fd, 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;
 	int error = -EBADF;
 	if (file) {
 	if (file) {
 		error = vfs_statfs(&file->f_path, st);
 		error = vfs_statfs(&file->f_path, st);
-		fput(file);
+		fput_light(file, fput_needed);
 	}
 	}
 	return error;
 	return error;
 }
 }