Skip to content

Commit 29a7b26

Browse files
Haoxiang Licmaiolino
authored andcommitted
xfs: fix a resource leak in xfs_alloc_buftarg()
In the error path, call fs_put_dax() to drop the DAX device reference. Fixes: 6f643c5 ("xfs: implement ->notify_failure() for XFS") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org>
1 parent c658488 commit 29a7b26

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/xfs/xfs_buf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,6 +1756,7 @@ xfs_alloc_buftarg(
17561756
return btp;
17571757

17581758
error_free:
1759+
fs_put_dax(btp->bt_daxdev, mp);
17591760
kfree(btp);
17601761
return ERR_PTR(error);
17611762
}

0 commit comments

Comments
 (0)