diff options
Diffstat (limited to 'fs/xfs/xfs_dquot.c')
-rw-r--r-- | fs/xfs/xfs_dquot.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index 22bb52ee82c8..5593a344732c 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c @@ -586,7 +586,7 @@ err: * * If XFS_QMOPT_DQALLOC is set, allocate a dquot on disk if it needed. */ -int +static int xfs_qm_dqread( struct xfs_mount *mp, xfs_dqid_t id, @@ -832,6 +832,28 @@ restart: return 0; } +/* + * Given a dquot id and type, read and initialize a dquot from the on-disk + * metadata. This function is only for use during quota initialization so + * it ignores the dquot cache assuming that the dquot shrinker isn't set up. + * The caller is responsible for _qm_dqdestroy'ing the returned dquot. + */ +int +xfs_qm_dqget_uncached( + struct xfs_mount *mp, + xfs_dqid_t id, + uint type, + struct xfs_dquot **dqpp) +{ + int error; + + error = xfs_qm_dqget_checks(mp, type); + if (error) + return error; + + return xfs_qm_dqread(mp, id, type, 0, dqpp); +} + /* Return the quota id for a given inode and type. */ xfs_dqid_t xfs_qm_id_for_quotatype( |