未验证 提交 f69e8091 编写于 作者: C Christoph Hellwig 提交者: Christian Brauner

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: f736d93d ("xfs: support idmapped mounts")
Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
Acked-by: NChristian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NChristian Brauner <christian.brauner@ubuntu.com>
上级 f736d93d
...@@ -438,7 +438,6 @@ xfs_file_compat_ioctl( ...@@ -438,7 +438,6 @@ xfs_file_compat_ioctl(
{ {
struct inode *inode = file_inode(filp); struct inode *inode = file_inode(filp);
struct xfs_inode *ip = XFS_I(inode); struct xfs_inode *ip = XFS_I(inode);
struct xfs_mount *mp = ip->i_mount;
void __user *arg = compat_ptr(p); void __user *arg = compat_ptr(p);
int error; int error;
...@@ -458,7 +457,7 @@ xfs_file_compat_ioctl( ...@@ -458,7 +457,7 @@ xfs_file_compat_ioctl(
return xfs_ioc_space(filp, &bf); return xfs_ioc_space(filp, &bf);
} }
case XFS_IOC_FSGEOMETRY_V1_32: case XFS_IOC_FSGEOMETRY_V1_32:
return xfs_compat_ioc_fsgeometry_v1(mp, arg); return xfs_compat_ioc_fsgeometry_v1(ip->i_mount, arg);
case XFS_IOC_FSGROWFSDATA_32: { case XFS_IOC_FSGROWFSDATA_32: {
struct xfs_growfs_data in; struct xfs_growfs_data in;
...@@ -467,7 +466,7 @@ xfs_file_compat_ioctl( ...@@ -467,7 +466,7 @@ xfs_file_compat_ioctl(
error = mnt_want_write_file(filp); error = mnt_want_write_file(filp);
if (error) if (error)
return error; return error;
error = xfs_growfs_data(mp, &in); error = xfs_growfs_data(ip->i_mount, &in);
mnt_drop_write_file(filp); mnt_drop_write_file(filp);
return error; return error;
} }
...@@ -479,7 +478,7 @@ xfs_file_compat_ioctl( ...@@ -479,7 +478,7 @@ xfs_file_compat_ioctl(
error = mnt_want_write_file(filp); error = mnt_want_write_file(filp);
if (error) if (error)
return error; return error;
error = xfs_growfs_rt(mp, &in); error = xfs_growfs_rt(ip->i_mount, &in);
mnt_drop_write_file(filp); mnt_drop_write_file(filp);
return error; return error;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册