summaryrefslogtreecommitdiffstats
path: root/fs/fuse/file.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2019-05-27 11:42:07 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2019-05-27 11:42:35 +0200
commit35d6fcbb7c3e296a52136347346a698a35af3fda (patch)
tree19075d9f089e973f16320ee6354722aaf17460b9 /fs/fuse/file.c
parentLinux 5.2-rc2 (diff)
downloadlinux-35d6fcbb7c3e296a52136347346a698a35af3fda.tar.xz
linux-35d6fcbb7c3e296a52136347346a698a35af3fda.zip
fuse: fallocate: fix return with locked inode
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>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r--fs/fuse/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 3959f08279e6..143c54f93f2d 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -3055,7 +3055,7 @@ static long fuse_file_fallocate(struct file *file, int mode, loff_t offset,
offset + length > i_size_read(inode)) {
err = inode_newsize_ok(inode, offset + length);
if (err)
- return err;
+ goto out;
}
if (!(mode & FALLOC_FL_KEEP_SIZE))