summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-26 20:15:40 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:10:03 -0400
commit6b48c5b2079af1f81d8f249ae07a988d8c45b32f (patch)
tree5e27acdff40789f6860d222d6b44803c305e29a9
parentbf2965d5b5950d09e934ea5d961d79d0ed1fae7e (diff)
downloadlinux-6b48c5b2079af1f81d8f249ae07a988d8c45b32f.tar.bz2
switch fallocate(2) to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/open.c6
1 files changed, 3 insertions, 3 deletions
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;