forked from Minki/linux
Changes since last update:
- Fix a memory leak in the new in-core extent map. - Refactor the xfs_dev_t conversions for easier xfsprogs porting -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCgAGBQJaFH3KAAoJEPh/dxk0SrTrkDgQAIz7YHFpWxcbyVPJnk84lMov +UlovbgTtY6sgrfgfMk/o072gBpnUEme10w47GikKB86f/FAvfVjXC7jujshXy+I OmoZalwwDpIDpv/QAP79gZL9JQxSBY9on57pMiAIAn4z1saLGzJ7I97cAIv15dyy f0viWEVfML417Rgr3/cBgK0RfK1ShjcF/jmk/S7I+2L7fAPwGZHBFT1PJ+IYYleG FyrMoKi21AAzomnGWMtr2O/Deaip0zio8Yzg5LhthW0vBv6Hi6meVZZnLqDTQkve 1MfKOuDm75SszNwWCnisPjC/KNiEd9nL2vRJZYx6lWrXMwIxoj+IpXVavR4z97zS QFVDtUpCRHKaj4vT1wPvYuqAQFusigvTvgpZALp9Pt18RL4CbSI9mKtqrdEZWJ2F YAhK8i5OytbFoK6MbgsBTwKZz9eKAck8ummWIViMNN1Wyroxemvs6p/+eRBEKDIW Hz/SMSAdLdPcw/HGG5Y+KE5lKWATSUWk7u5YQDt68prriLI6h3qKl1ssX6mtb7P7 DkW+aLW0Zxqy79s2eDpvNPZrYe7bEnanAejJa3Qz8VcI9H5roX+2cQzSjWh4zUua 6dJwPaupJDHlrR5VSG+oPC/q7v9b7X4LnsqHGpt0wSgdyuqhg+vHXo2ARIu8oAvP TMHdg1ICt5sPy+6eWtDD =1IEk -----END PGP SIGNATURE----- Merge tag 'xfs-4.15-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - Fix a memory leak in the new in-core extent map - Refactor the xfs_dev_t conversions for easier xfsprogs porting * tag 'xfs-4.15-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: abstract out dev_t conversions xfs: fix memory leak in xfs_iext_free_last_leaf
This commit is contained in:
commit
3f3211e755
@ -850,9 +850,9 @@ static void
|
||||
xfs_iext_free_last_leaf(
|
||||
struct xfs_ifork *ifp)
|
||||
{
|
||||
ifp->if_u1.if_root = NULL;
|
||||
ifp->if_height--;
|
||||
kmem_free(ifp->if_u1.if_root);
|
||||
ifp->if_u1.if_root = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -42,11 +42,6 @@ STATIC int xfs_iformat_local(xfs_inode_t *, xfs_dinode_t *, int, int);
|
||||
STATIC int xfs_iformat_extents(xfs_inode_t *, xfs_dinode_t *, int);
|
||||
STATIC int xfs_iformat_btree(xfs_inode_t *, xfs_dinode_t *, int);
|
||||
|
||||
static inline dev_t xfs_to_linux_dev_t(xfs_dev_t dev)
|
||||
{
|
||||
return MKDEV(sysv_major(dev) & 0x1ff, sysv_minor(dev));
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy inode type and data and attr format specific information from the
|
||||
* on-disk inode to the in-core inode and fork structures. For fifos, devices,
|
||||
@ -792,7 +787,8 @@ xfs_iflush_fork(
|
||||
case XFS_DINODE_FMT_DEV:
|
||||
if (iip->ili_fields & XFS_ILOG_DEV) {
|
||||
ASSERT(whichfork == XFS_DATA_FORK);
|
||||
xfs_dinode_put_rdev(dip, sysv_encode_dev(VFS_I(ip)->i_rdev));
|
||||
xfs_dinode_put_rdev(dip,
|
||||
linux_to_xfs_dev_t(VFS_I(ip)->i_rdev));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -204,6 +204,16 @@ static inline kgid_t xfs_gid_to_kgid(uint32_t gid)
|
||||
return make_kgid(&init_user_ns, gid);
|
||||
}
|
||||
|
||||
static inline dev_t xfs_to_linux_dev_t(xfs_dev_t dev)
|
||||
{
|
||||
return MKDEV(sysv_major(dev) & 0x1ff, sysv_minor(dev));
|
||||
}
|
||||
|
||||
static inline xfs_dev_t linux_to_xfs_dev_t(dev_t dev)
|
||||
{
|
||||
return sysv_encode_dev(dev);
|
||||
}
|
||||
|
||||
/*
|
||||
* Various platform dependent calls that don't fit anywhere else
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user