diff options
| author | Darrick J. Wong <[email protected]> | 2024-07-02 18:22:33 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2024-07-02 18:36:56 +0000 |
| commit | fcea5b35f36233c04003ab8b3eb081b5e20e1aa4 (patch) | |
| tree | 7e1201539401ddd579db627525641c687abbb5fa /fs/xfs/libxfs/xfs_inode_util.c | |
| parent | xfs: hoist inode flag conversion functions to libxfs (diff) | |
| download | kernel-fcea5b35f36233c04003ab8b3eb081b5e20e1aa4.tar.gz kernel-fcea5b35f36233c04003ab8b3eb081b5e20e1aa4.zip | |
xfs: hoist project id get/set functions to libxfs
Move the project id get and set functions into libxfs.
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_util.c')
| -rw-r--r-- | fs/xfs/libxfs/xfs_inode_util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_util.c b/fs/xfs/libxfs/xfs_inode_util.c index ed5e1a9b4b8c..3b5397a3f34f 100644 --- a/fs/xfs/libxfs/xfs_inode_util.c +++ b/fs/xfs/libxfs/xfs_inode_util.c @@ -122,3 +122,13 @@ xfs_ip2xflags( flags |= FS_XFLAG_HASATTR; return flags; } + +prid_t +xfs_get_initial_prid(struct xfs_inode *dp) +{ + if (dp->i_diflags & XFS_DIFLAG_PROJINHERIT) + return dp->i_projid; + + /* Assign to the root project by default. */ + return 0; +} |
