diff options
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index f71341cd8340..3bb5f980fabf 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -961,6 +961,16 @@ xfs_ireq_setup( memchr_inv(hdr->reserved, 0, sizeof(hdr->reserved))) return -EINVAL; + if (hdr->flags & XFS_IREQ_SPECIAL) { + switch (hdr->ino) { + case XFS_IREQ_SPECIAL_ROOT: + hdr->ino = mp->m_sb.sb_rootino; + break; + default: + return -EINVAL; + } + } + if (XFS_INO_TO_AGNO(mp, hdr->ino) >= mp->m_sb.sb_agcount) return -EINVAL; |