From: Al Viro Date: Mon, 27 Aug 2012 00:27:09 +0000 (-0400) Subject: switch fadvise(2) to fget_light() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=611443783ada3464c44e9168f6b7de2cb3fed39a;p=openwrt%2Fstaging%2Fblogic.git switch fadvise(2) to fget_light() Signed-off-by: Al Viro --- diff --git a/mm/fadvise.c b/mm/fadvise.c index 9b75a045dbf4..a83245763cf8 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