summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-19 23:52:50 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-05-29 23:28:29 -0400
commitc2bd6c11cd05fed1eeb83230e87351357d72bb48 (patch)
tree481791ce0e785b34c5b8de527c9fac28662788a7 /fs
parent442a9ffabb21f175027e93e72ea05159818271a6 (diff)
downloadop-kernel-dev-c2bd6c11cd05fed1eeb83230e87351357d72bb48.zip
op-kernel-dev-c2bd6c11cd05fed1eeb83230e87351357d72bb48.tar.gz
switch do_fsync() to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/sync.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/sync.c b/fs/sync.c
index 0e8db93..11e3d1c 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -188,11 +188,12 @@ static int do_fsync(unsigned int fd, int datasync)
{
struct file *file;
int ret = -EBADF;
+ int fput_needed;
- file = fget(fd);
+ file = fget_light(fd, &fput_needed);
if (file) {
ret = vfs_fsync(file, datasync);
- fput(file);
+ fput_light(file, fput_needed);
}
return ret;
}
OpenPOWER on IntegriCloud