Skip to content

Commit 817644f

Browse files
hshiinaDarrick J. Wong
authored andcommitted
xfs: get root inode correctly at bulkstat
The root inode number should be set to `breq->startino` for getting stat information of the root when XFS_BULK_IREQ_SPECIAL_ROOT is used. Otherwise, the inode search is started from 1 (XFS_BULK_IREQ_SPECIAL_ROOT) and the inode with the lowest number in a filesystem is returned. Fixes: bf3cb39 ("xfs: allow single bulkstat of special inodes") Signed-off-by: Hironori Shiina <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent c0f399f commit 817644f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/xfs/xfs_ioctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ xfs_bulkstat_fmt(
754754
static int
755755
xfs_bulk_ireq_setup(
756756
struct xfs_mount *mp,
757-
struct xfs_bulk_ireq *hdr,
757+
const struct xfs_bulk_ireq *hdr,
758758
struct xfs_ibulk *breq,
759759
void __user *ubuffer)
760760
{
@@ -780,7 +780,7 @@ xfs_bulk_ireq_setup(
780780

781781
switch (hdr->ino) {
782782
case XFS_BULK_IREQ_SPECIAL_ROOT:
783-
hdr->ino = mp->m_sb.sb_rootino;
783+
breq->startino = mp->m_sb.sb_rootino;
784784
break;
785785
default:
786786
return -EINVAL;

0 commit comments

Comments
 (0)