OSDN Git Service

fcntl: don't leak fd reference when fixup_compat_flock fails
authorJeff Layton <jlayton@redhat.com>
Tue, 14 Nov 2017 19:43:56 +0000 (14:43 -0500)
committerJeff Layton <jlayton@redhat.com>
Wed, 15 Nov 2017 13:08:36 +0000 (08:08 -0500)
commit9280a601e6080c9ff658468c1c775ff6514099a6
tree0a5dc48bc01349b5c46a24427cd75616e0bc2e51
parent4e897f5bb9af5a1d4da07ae0c6598c6ee4e08471
fcntl: don't leak fd reference when fixup_compat_flock fails

Currently we just return err here, but we need to put the fd reference
first.

Fixes: 94073ad77fff (fs/locks: don't mess with the address limit in compat_fcntl64)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
fs/fcntl.c