fuse: fallocate: fix return with locked inode
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 27 May 2019 09:42:07 +0000 (11:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jun 2019 10:21:48 +0000 (12:21 +0200)
commit7a28b74256417017ba576979e315a39313f832d3
tree70637ddf431ab1f46df05fb08e11bdb8fa429405
parent91f4595129915406ad2ecbc6bd2591cdf0ce5f8b
fuse: fallocate: fix return with locked inode

commit 35d6fcbb7c3e296a52136347346a698a35af3fda upstream.

Do the proper cleanup in case the size check fails.

Tested with xfstests:generic/228

Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 0cbade024ba5 ("fuse: honor RLIMIT_FSIZE in fuse_file_fallocate")
Cc: Liu Bo <bo.liu@linux.alibaba.com>
Cc: <stable@vger.kernel.org> # v3.5
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/file.c