xfs_ioctl32.c (ead5d1f4d877e92c051e1a1ade623d0d30e71619) xfs_ioctl32.c (f736d93d76d3e97d6986c6d26c8eaa32536ccc5c)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2004-2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
5 */
6#include <linux/mount.h>
7#include <linux/fsmap.h>
8#include "xfs.h"

--- 195 unchanged lines hidden (view full) ---

204 return -EFAULT;
205
206 return xfs_ibulk_advance(breq, sizeof(struct compat_xfs_bstat));
207}
208
209/* copied from xfs_ioctl.c */
210STATIC int
211xfs_compat_ioc_fsbulkstat(
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2004-2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
5 */
6#include <linux/mount.h>
7#include <linux/fsmap.h>
8#include "xfs.h"

--- 195 unchanged lines hidden (view full) ---

204 return -EFAULT;
205
206 return xfs_ibulk_advance(breq, sizeof(struct compat_xfs_bstat));
207}
208
209/* copied from xfs_ioctl.c */
210STATIC int
211xfs_compat_ioc_fsbulkstat(
212 xfs_mount_t *mp,
212 struct file *file,
213 unsigned int cmd,
214 struct compat_xfs_fsop_bulkreq __user *p32)
215{
213 unsigned int cmd,
214 struct compat_xfs_fsop_bulkreq __user *p32)
215{
216 struct xfs_mount *mp = XFS_I(file_inode(file))->i_mount;
216 u32 addr;
217 struct xfs_fsop_bulkreq bulkreq;
218 struct xfs_ibulk breq = {
219 .mp = mp,
217 u32 addr;
218 struct xfs_fsop_bulkreq bulkreq;
219 struct xfs_ibulk breq = {
220 .mp = mp,
221 .mnt_userns = file_mnt_user_ns(file),
220 .ocount = 0,
221 };
222 xfs_ino_t lastino;
223 int error;
224
225 /*
226 * Output structure handling functions. Depending on the command,
227 * either the xfs_bstat and xfs_inogrp structures are written out

--- 274 unchanged lines hidden (view full) ---

502 return error;
503 error = xfs_ioc_swapext(&sxp);
504 mnt_drop_write_file(filp);
505 return error;
506 }
507 case XFS_IOC_FSBULKSTAT_32:
508 case XFS_IOC_FSBULKSTAT_SINGLE_32:
509 case XFS_IOC_FSINUMBERS_32:
222 .ocount = 0,
223 };
224 xfs_ino_t lastino;
225 int error;
226
227 /*
228 * Output structure handling functions. Depending on the command,
229 * either the xfs_bstat and xfs_inogrp structures are written out

--- 274 unchanged lines hidden (view full) ---

504 return error;
505 error = xfs_ioc_swapext(&sxp);
506 mnt_drop_write_file(filp);
507 return error;
508 }
509 case XFS_IOC_FSBULKSTAT_32:
510 case XFS_IOC_FSBULKSTAT_SINGLE_32:
511 case XFS_IOC_FSINUMBERS_32:
510 return xfs_compat_ioc_fsbulkstat(mp, cmd, arg);
512 return xfs_compat_ioc_fsbulkstat(filp, cmd, arg);
511 case XFS_IOC_FD_TO_HANDLE_32:
512 case XFS_IOC_PATH_TO_HANDLE_32:
513 case XFS_IOC_PATH_TO_FSHANDLE_32: {
514 struct xfs_fsop_handlereq hreq;
515
516 if (xfs_compat_handlereq_copyin(&hreq, arg))
517 return -EFAULT;
518 cmd = _NATIVE_IOC(cmd, struct xfs_fsop_handlereq);

--- 25 unchanged lines hidden ---
513 case XFS_IOC_FD_TO_HANDLE_32:
514 case XFS_IOC_PATH_TO_HANDLE_32:
515 case XFS_IOC_PATH_TO_FSHANDLE_32: {
516 struct xfs_fsop_handlereq hreq;
517
518 if (xfs_compat_handlereq_copyin(&hreq, arg))
519 return -EFAULT;
520 cmd = _NATIVE_IOC(cmd, struct xfs_fsop_handlereq);

--- 25 unchanged lines hidden ---