diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-19 23:52:50 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-29 23:28:29 -0400 |
commit | c2bd6c11cd05fed1eeb83230e87351357d72bb48 (patch) | |
tree | 481791ce0e785b34c5b8de527c9fac28662788a7 /fs/sync.c | |
parent | 442a9ffabb21f175027e93e72ea05159818271a6 (diff) |
switch do_fsync() to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/sync.c')
-rw-r--r-- | fs/sync.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -188,11 +188,12 @@ static int do_fsync(unsigned int fd, int datasync) | |||
188 | { | 188 | { |
189 | struct file *file; | 189 | struct file *file; |
190 | int ret = -EBADF; | 190 | int ret = -EBADF; |
191 | int fput_needed; | ||
191 | 192 | ||
192 | file = fget(fd); | 193 | file = fget_light(fd, &fput_needed); |
193 | if (file) { | 194 | if (file) { |
194 | ret = vfs_fsync(file, datasync); | 195 | ret = vfs_fsync(file, datasync); |
195 | fput(file); | 196 | fput_light(file, fput_needed); |
196 | } | 197 | } |
197 | return ret; | 198 | return ret; |
198 | } | 199 | } |