mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 09:02:21 -04:00
xfs: fix a resource leak in xfs_alloc_buftarg()
In the error path, call fs_put_dax() to drop the DAX
device reference.
Fixes: 6f643c57d5 ("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>
This commit is contained in:
committed by
Carlos Maiolino
parent
c658488886
commit
29a7b26143
@@ -1756,6 +1756,7 @@ xfs_alloc_buftarg(
|
||||
return btp;
|
||||
|
||||
error_free:
|
||||
fs_put_dax(btp->bt_daxdev, mp);
|
||||
kfree(btp);
|
||||
return ERR_PTR(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user