]> www.infradead.org Git - users/hch/xfsprogs.git/commit
libxfs: when creating a file in a directory, set the project id based on the parent
authorDarrick J. Wong <djwong@kernel.org>
Wed, 2 Oct 2024 01:11:29 +0000 (18:11 -0700)
committerAndrey Albershteyn <aalbersh@redhat.com>
Fri, 4 Oct 2024 10:42:07 +0000 (12:42 +0200)
commitff9ad30a71493408cbdba36727ad9d998ed03238
treee657de08d7cb867b853515e15a723a89b2906222
parent5d1e5c013750d781efa1f793a5bd1b6fd179df04
libxfs: when creating a file in a directory, set the project id based on the parent

When we're creating a file as a child of an existing directory, use
xfs_get_initial_prid to have the child inherit the project id of the
directory if the directory has PROJINHERIT set, just like the kernel
does.  This fixes mkfs project id propagation with -d projinherit=X when
protofiles are in use.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/inode.c
libxfs/libxfs_api_defs.h