From: Al Viro Date: Mon, 27 Aug 2012 00:15:40 +0000 (-0400) Subject: switch fallocate(2) to fget_light() X-Git-Tag: next-20120928~93^2~38 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6b48c5b2079af1f81d8f249ae07a988d8c45b32f;p=karo-tx-linux.git switch fallocate(2) to fget_light() Signed-off-by: Al Viro --- diff --git a/fs/open.c b/fs/open.c index 9f61d7269d39..da6d3f1ac243 100644 --- a/fs/open.c +++ b/fs/open.c @@ -277,12 +277,12 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len) SYSCALL_DEFINE(fallocate)(int fd, int mode, loff_t offset, loff_t len) { struct file *file; - int error = -EBADF; + int error = -EBADF, fput_needed; - file = fget(fd); + file = fget_light(fd, &fput_needed); if (file) { error = do_fallocate(file, mode, offset, len); - fput(file); + fput_light(file, fput_needed); } return error;