diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-26 20:15:40 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 21:10:03 -0400 |
commit | 6b48c5b2079af1f81d8f249ae07a988d8c45b32f (patch) | |
tree | 5e27acdff40789f6860d222d6b44803c305e29a9 /fs/open.c | |
parent | bf2965d5b5950d09e934ea5d961d79d0ed1fae7e (diff) | |
download | lwn-6b48c5b2079af1f81d8f249ae07a988d8c45b32f.tar.gz lwn-6b48c5b2079af1f81d8f249ae07a988d8c45b32f.zip |
switch fallocate(2) to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 6 |
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; |