Skip to content

Commit f69e809

Browse files
Christoph HellwigChristian Brauner
authored andcommitted
xfs: remove the possibly unused mp variable in xfs_file_compat_ioctl
The mp variable in xfs_file_compat_ioctl is only used when BROKEN_X86_ALIGNMENT is define. Remove it and just open code the dereference in a few places. Link: https://lore.kernel.org/r/20210203173009.462205-1-christian.brauner@ubuntu.com Fixes: f736d93 ("xfs: support idmapped mounts") Reviewed-by: Darrick J. Wong <djwong@kernel.org> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
1 parent f736d93 commit f69e809

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

fs/xfs/xfs_ioctl32.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ xfs_file_compat_ioctl(
438438
{
439439
struct inode *inode = file_inode(filp);
440440
struct xfs_inode *ip = XFS_I(inode);
441-
struct xfs_mount *mp = ip->i_mount;
442441
void __user *arg = compat_ptr(p);
443442
int error;
444443

@@ -458,7 +457,7 @@ xfs_file_compat_ioctl(
458457
return xfs_ioc_space(filp, &bf);
459458
}
460459
case XFS_IOC_FSGEOMETRY_V1_32:
461-
return xfs_compat_ioc_fsgeometry_v1(mp, arg);
460+
return xfs_compat_ioc_fsgeometry_v1(ip->i_mount, arg);
462461
case XFS_IOC_FSGROWFSDATA_32: {
463462
struct xfs_growfs_data in;
464463

@@ -467,7 +466,7 @@ xfs_file_compat_ioctl(
467466
error = mnt_want_write_file(filp);
468467
if (error)
469468
return error;
470-
error = xfs_growfs_data(mp, &in);
469+
error = xfs_growfs_data(ip->i_mount, &in);
471470
mnt_drop_write_file(filp);
472471
return error;
473472
}
@@ -479,7 +478,7 @@ xfs_file_compat_ioctl(
479478
error = mnt_want_write_file(filp);
480479
if (error)
481480
return error;
482-
error = xfs_growfs_rt(mp, &in);
481+
error = xfs_growfs_rt(ip->i_mount, &in);
483482
mnt_drop_write_file(filp);
484483
return error;
485484
}

0 commit comments

Comments
 (0)