diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-04-22 09:48:24 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-04-23 16:55:17 -0700 |
commit | be7cf174e908b1f350dd3ae4fbdf335f22af3273 (patch) | |
tree | 24d9a5c7c4cc7de3b4c4be12303e89034d257a9d /fs/xfs/xfs_ioctl.c | |
parent | 271557de7cbfdecb08e89ae1ca74647ceb57224f (diff) | |
download | linux-stable-be7cf174e908b1f350dd3ae4fbdf335f22af3273.tar.gz linux-stable-be7cf174e908b1f350dd3ae4fbdf335f22af3273.tar.bz2 linux-stable-be7cf174e908b1f350dd3ae4fbdf335f22af3273.zip |
xfs: move xfs_ioc_scrub_metadata to scrub.c
Move the scrub ioctl handler to scrub.c to keep the code together and to
reduce unnecessary code when CONFIG_XFS_ONLINE_SCRUB=n.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 0e97070abe80..857b19428984 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -1055,30 +1055,6 @@ out_free: return error; } -STATIC int -xfs_ioc_scrub_metadata( - struct file *file, - void __user *arg) -{ - struct xfs_scrub_metadata scrub; - int error; - - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - - if (copy_from_user(&scrub, arg, sizeof(scrub))) - return -EFAULT; - - error = xfs_scrub_metadata(file, &scrub); - if (error) - return error; - - if (copy_to_user(arg, &scrub, sizeof(scrub))) - return -EFAULT; - - return 0; -} - int xfs_ioc_swapext( xfs_swapext_t *sxp) |