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.
Unified · Split
| @@ -438,7 +438,6 @@ xfs_file_compat_ioctl( · 437 unmodified lines | |||
| 438 | { | 438 | { |
| 439 | struct inode *inode = file_inode(filp); | 439 | struct inode *inode = file_inode(filp); |
| 440 | struct xfs_inode *ip = XFS_I(inode); | 440 | struct xfs_inode *ip = XFS_I(inode); |
| 441 | struct xfs_mount *mp = ip->i_mount; | ||
| 442 | void __user *arg = compat_ptr(p); | 441 | void __user *arg = compat_ptr(p); |
| 443 | int error; | 442 | int error; |
| 444 | 443 | ||
| @@ -458,7 +457,7 @@ xfs_file_compat_ioctl( · 13 unmodified lines | |||
| 458 | return xfs_ioc_space(filp, &bf); | 457 | return xfs_ioc_space(filp, &bf); |
| 459 | } | 458 | } |
| 460 | case XFS_IOC_FSGEOMETRY_V1_32: | 459 | 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); |
| 462 | case XFS_IOC_FSGROWFSDATA_32: { | 461 | case XFS_IOC_FSGROWFSDATA_32: { |
| 463 | struct xfs_growfs_data in; | 462 | struct xfs_growfs_data in; |
| 464 | 463 | ||
| @@ -467,7 +466,7 @@ xfs_file_compat_ioctl( · 2 unmodified lines | |||
| 467 | error = mnt_want_write_file(filp); | 466 | error = mnt_want_write_file(filp); |
| 468 | if (error) | 467 | if (error) |
| 469 | return error; | 468 | return error; |
| 470 | error = xfs_growfs_data(mp, &in); | 469 | error = xfs_growfs_data(ip->i_mount, &in); |
| 471 | mnt_drop_write_file(filp); | 470 | mnt_drop_write_file(filp); |
| 472 | return error; | 471 | return error; |
| 473 | } | 472 | } |
| @@ -479,7 +478,7 @@ xfs_file_compat_ioctl( · 5 unmodified lines | |||
| 479 | error = mnt_want_write_file(filp); | 478 | error = mnt_want_write_file(filp); |
| 480 | if (error) | 479 | if (error) |
| 481 | return error; | 480 | return error; |
| 482 | error = xfs_growfs_rt(mp, &in); | 481 | error = xfs_growfs_rt(ip->i_mount, &in); |
| 483 | mnt_drop_write_file(filp); | 482 | mnt_drop_write_file(filp); |
| 484 | return error; | 483 | return error; |
| 485 | } | 484 | } |