An error occurred while fetching folder content.
xfs: Fix error code in 'xfs_ioc_getbmap()'
Christophe JAILLET authored
commit 132bf672 upstream.

In this function, once 'buf' has been allocated, we unconditionally
return 0.
However, 'error' is set to some error codes in several error handling
paths.
Before commit 232b5194 ("xfs: simplify the xfs_getbmap interface")
this was not an issue because all error paths were returning directly,
but now that some cleanup at the end may be needed, we must propagate the
error code.

Fixes: 232b5194

 ("xfs: simplify the xfs_getbmap interface")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
b6095cbd
Name Last commit Last update
..
9p v9fs_dir_readdir: fix double-free on p9stat_read error
adfs adfs: use timespec64 for time conversion
affs affs: fix potential memory leak when parsing option 'prefix'
afs afs: Fix validation/callback interaction
autofs Merge branch 'akpm' (patches from Andrew)
befs fix a series of Documentation/ broken file name references
bfs bfs: add sanity check at bfs_fill_super()
btrfs btrfs: use tagged writepage to mitigate livelock of snapshot
cachefiles fscache, cachefiles: remove redundant variable 'cache'
ceph ceph: clear inode pointer when snap realm gets dropped by its inode
cifs cifs: check ntwrk_buf_start for NULL before dereferencing it
coda vfs: change inode times to use struct timespec64
configfs configfs: fix registered group removal
cramfs Cramfs: fix abad comparison when wrap-arounds occur
crypto crypto: speck - remove Speck
debugfs Revert "debugfs: inode: debugfs_create_dir uses mode permission from parent"
devpts devpts: Convert to new IDA API
dlm dlm: Don't swamp the CPU with callbacks queued during recovery
ecryptfs Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
efivarfs efivars: Call guid_parse() against guid_t type of variable
efs Rename superblock flags (MS_xyz -> SB_xyz)
exofs fs/exofs: fix potential memory leak in mount option parsing
exportfs exportfs: do not read dentry after free
ext2 ext2: fix potential use after free
ext4 ext4: fix special inode number checks in __ext4_iget()
f2fs
fat
freevxfs
fscache
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hugetlbfs
isofs
jbd2
jffs2
jfs
kernfs
lockd
minix
nfs
nfs_common
nfsd
nilfs2
nls
notify
ntfs
ocfs2
omfs
openpromfs
orangefs
overlayfs
proc
pstore
qnx4
qnx6
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
tracefs
ubifs
udf
ufs
xfs
Kconfig
Kconfig.binfmt
Makefile
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
block_dev.c
buffer.c
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c
coredump.c
d_path.c
dax.c
dcache.c
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c