diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-27 02:15:40 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-27 03:10:03 +0200 |
commit | 6b48c5b2079af1f81d8f249ae07a988d8c45b32f (patch) | |
tree | 5e27acdff40789f6860d222d6b44803c305e29a9 /fs/open.c | |
parent | switch ftruncate(2) to fget_light (diff) | |
download | linux-6b48c5b2079af1f81d8f249ae07a988d8c45b32f.tar.xz linux-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; |