summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_dquot.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_dquot.h')
-rw-r--r--fs/xfs/xfs_dquot.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_dquot.h b/fs/xfs/xfs_dquot.h
index c617bac75361..61217adf5ba5 100644
--- a/fs/xfs/xfs_dquot.h
+++ b/fs/xfs/xfs_dquot.h
@@ -160,6 +160,9 @@ static inline struct xfs_dquot *xfs_inode_dquot(
struct xfs_inode *ip,
xfs_dqtype_t type)
{
+ if (xfs_is_metadir_inode(ip))
+ return NULL;
+
switch (type) {
case XFS_DQTYPE_USER:
return ip->i_udquot;