aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2018-11-06 10:50:50 -0500
committerDarrick J. Wong <darrick.wong@oracle.com>2018-11-06 10:50:50 -0500
commit132bf6723749f7219c399831eeb286dbbb985429 (patch)
treee75c67056ddc474f967da3b0396586c970d58968 /fs/xfs
parent651022382c7f8da46cb4872a545ee1da6d097d2a (diff)
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 232b51948b99 ("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: 232b51948b99 ("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>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 6e2c08f30f60..6ecdbb3af7de 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1608,7 +1608,7 @@ xfs_ioc_getbmap(
1608 error = 0; 1608 error = 0;
1609out_free_buf: 1609out_free_buf:
1610 kmem_free(buf); 1610 kmem_free(buf);
1611 return 0; 1611 return error;
1612} 1612}
1613 1613
1614struct getfsmap_info { 1614struct getfsmap_info {