OSDN Git Service

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:22:47 +0000 (12:22 +0200)
commit4fb410bd826942383c7aecafb1ee9b06486278f3
tree2a678b71d711631b510c488570b04989db86a17d
parent663bacefdae5f322c6eca5f9878a1bcf4366e7df
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