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) |
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
@@ -277,12 +277,12 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len) | |||
277 | SYSCALL_DEFINE(fallocate)(int fd, int mode, loff_t offset, loff_t len) | 277 | SYSCALL_DEFINE(fallocate)(int fd, int mode, loff_t offset, loff_t len) |
278 | { | 278 | { |
279 | struct file *file; | 279 | struct file *file; |
280 | int error = -EBADF; | 280 | int error = -EBADF, fput_needed; |
281 | 281 | ||
282 | file = fget(fd); | 282 | file = fget_light(fd, &fput_needed); |
283 | if (file) { | 283 | if (file) { |
284 | error = do_fallocate(file, mode, offset, len); | 284 | error = do_fallocate(file, mode, offset, len); |
285 | fput(file); | 285 | fput_light(file, fput_needed); |
286 | } | 286 | } |
287 | 287 | ||
288 | return error; | 288 | return error; |