summaryrefslogtreecommitdiffstats
path: root/mm/fadvise.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-26 20:27:09 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:10:04 -0400
commit611443783ada3464c44e9168f6b7de2cb3fed39a (patch)
treeb78b84c6e3ff1e1f10fb24be62dd821cf5d6c936 /mm/fadvise.c
parentd6483b7a78438bc333560d11b69e6a6a6cf55940 (diff)
switch fadvise(2) to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm/fadvise.c')
-rw-r--r--mm/fadvise.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/fadvise.c b/mm/fadvise.c
index 9b75a045dbf..a83245763cf 100644
--- a/mm/fadvise.c
+++ b/mm/fadvise.c
@@ -26,7 +26,8 @@
*/
SYSCALL_DEFINE(fadvise64_64)(int fd, loff_t offset, loff_t len, int advice)
{
- struct file *file = fget(fd);
+ int fput_needed;
+ struct file *file = fget_light(fd, &fput_needed);
struct address_space *mapping;
struct backing_dev_info *bdi;
loff_t endbyte; /* inclusive */
@@ -128,7 +129,7 @@ SYSCALL_DEFINE(fadvise64_64)(int fd, loff_t offset, loff_t len, int advice)
ret = -EINVAL;
}
out:
- fput(file);
+ fput_light(file, fput_needed);
return ret;
}
#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS