]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: Fix error code in 'xfs_ioc_getbmap()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 6 Nov 2018 15:50:50 +0000 (07:50 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 6 Nov 2018 15:50:50 +0000 (07:50 -0800)
commit26b4394fd10658e3ad92553b4227f7982898a35e
treee75c67056ddc474f967da3b0396586c970d58968
parenta9e80a095d95d1159b26f73bd6d9c2fadc7fb411
xfs: Fix error code in 'xfs_ioc_getbmap()'

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 957f4e6d932e ("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: 957f4e6d932e ("xfs: simplify the xfs_getbmap interface")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_ioctl.c