MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2UpdateGroupDirStat

Function Ext2UpdateGroupDirStat

Ext4Fsd/ext3/generic.c:1693–1728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1691}
1692
1693NTSTATUS
1694Ext2UpdateGroupDirStat(
1695 IN PEXT2_IRP_CONTEXT IrpContext,
1696 IN PEXT2_VCB Vcb,
1697 IN ULONG group
1698 )
1699{
1700 struct super_block *sb = &Vcb->sb;
1701 PEXT2_GROUP_DESC gd;
1702 struct buffer_head *gb = NULL;
1703 NTSTATUS status;
1704
1705 ExAcquireResourceExclusiveLite(&Vcb->MetaInode, TRUE);
1706
1707 /* get group desc */
1708 gd = ext4_get_group_desc(sb, group, &gb);
1709 if (!gd) {
1710 status = STATUS_INSUFFICIENT_RESOURCES;
1711 goto errorout;
1712 }
1713
1714 /* update group_desc and super_block */
1715 ext4_used_dirs_set(sb, gd, ext4_used_dirs_count(sb, gd) - 1);
1716 Ext2SaveGroup(IrpContext, Vcb, group);
1717 Ext2UpdateVcbStat(IrpContext, Vcb);
1718 status = STATUS_SUCCESS;
1719
1720errorout:
1721
1722 ExReleaseResourceLite(&Vcb->MetaInode);
1723
1724 if (gb)
1725 fini_bh(&gb);
1726
1727 return status;
1728}
1729
1730
1731NTSTATUS

Callers 1

Ext2SetReparsePointFunction · 0.85

Calls 6

ext4_get_group_descFunction · 0.85
ext4_used_dirs_setFunction · 0.85
ext4_used_dirs_countFunction · 0.85
Ext2SaveGroupFunction · 0.85
Ext2UpdateVcbStatFunction · 0.85
fini_bhFunction · 0.85

Tested by

no test coverage detected