From c2bd6c11cd05fed1eeb83230e87351357d72bb48 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 19 Apr 2012 23:52:50 -0400 Subject: [PATCH] switch do_fsync() to fget_light() Signed-off-by: Al Viro --- fs/sync.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/sync.c b/fs/sync.c index 0e8db939d96f..11e3d1c44901 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; }