From: Al Viro Date: Fri, 20 Apr 2012 03:52:50 +0000 (-0400) Subject: switch do_fsync() to fget_light() X-Git-Tag: upstream/snapshot3+hdmi~7309^2~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c2bd6c11cd05fed1eeb83230e87351357d72bb48;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git switch do_fsync() to fget_light() Signed-off-by: Al Viro --- 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; }