aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ioctl32.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_ioctl32.c')
-rw-r--r--fs/xfs/xfs_ioctl32.c106
1 files changed, 53 insertions, 53 deletions
diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c
index 944d5baa710a..e65ea67e3ae3 100644
--- a/fs/xfs/xfs_ioctl32.c
+++ b/fs/xfs/xfs_ioctl32.c
@@ -56,7 +56,7 @@ xfs_compat_flock64_copyin(
56 get_user(bf->l_sysid, &arg32->l_sysid) || 56 get_user(bf->l_sysid, &arg32->l_sysid) ||
57 get_user(bf->l_pid, &arg32->l_pid) || 57 get_user(bf->l_pid, &arg32->l_pid) ||
58 copy_from_user(bf->l_pad, &arg32->l_pad, 4*sizeof(u32))) 58 copy_from_user(bf->l_pad, &arg32->l_pad, 4*sizeof(u32)))
59 return -XFS_ERROR(EFAULT); 59 return -EFAULT;
60 return 0; 60 return 0;
61} 61}
62 62
@@ -70,10 +70,10 @@ xfs_compat_ioc_fsgeometry_v1(
70 70
71 error = xfs_fs_geometry(mp, &fsgeo, 3); 71 error = xfs_fs_geometry(mp, &fsgeo, 3);
72 if (error) 72 if (error)
73 return -error; 73 return error;
74 /* The 32-bit variant simply has some padding at the end */ 74 /* The 32-bit variant simply has some padding at the end */
75 if (copy_to_user(arg32, &fsgeo, sizeof(struct compat_xfs_fsop_geom_v1))) 75 if (copy_to_user(arg32, &fsgeo, sizeof(struct compat_xfs_fsop_geom_v1)))
76 return -XFS_ERROR(EFAULT); 76 return -EFAULT;
77 return 0; 77 return 0;
78} 78}
79 79
@@ -84,7 +84,7 @@ xfs_compat_growfs_data_copyin(
84{ 84{
85 if (get_user(in->newblocks, &arg32->newblocks) || 85 if (get_user(in->newblocks, &arg32->newblocks) ||
86 get_user(in->imaxpct, &arg32->imaxpct)) 86 get_user(in->imaxpct, &arg32->imaxpct))
87 return -XFS_ERROR(EFAULT); 87 return -EFAULT;
88 return 0; 88 return 0;
89} 89}
90 90
@@ -95,7 +95,7 @@ xfs_compat_growfs_rt_copyin(
95{ 95{
96 if (get_user(in->newblocks, &arg32->newblocks) || 96 if (get_user(in->newblocks, &arg32->newblocks) ||
97 get_user(in->extsize, &arg32->extsize)) 97 get_user(in->extsize, &arg32->extsize))
98 return -XFS_ERROR(EFAULT); 98 return -EFAULT;
99 return 0; 99 return 0;
100} 100}
101 101
@@ -113,7 +113,7 @@ xfs_inumbers_fmt_compat(
113 if (put_user(buffer[i].xi_startino, &p32[i].xi_startino) || 113 if (put_user(buffer[i].xi_startino, &p32[i].xi_startino) ||
114 put_user(buffer[i].xi_alloccount, &p32[i].xi_alloccount) || 114 put_user(buffer[i].xi_alloccount, &p32[i].xi_alloccount) ||
115 put_user(buffer[i].xi_allocmask, &p32[i].xi_allocmask)) 115 put_user(buffer[i].xi_allocmask, &p32[i].xi_allocmask))
116 return -XFS_ERROR(EFAULT); 116 return -EFAULT;
117 } 117 }
118 *written = count * sizeof(*p32); 118 *written = count * sizeof(*p32);
119 return 0; 119 return 0;
@@ -132,7 +132,7 @@ xfs_ioctl32_bstime_copyin(
132 132
133 if (get_user(sec32, &bstime32->tv_sec) || 133 if (get_user(sec32, &bstime32->tv_sec) ||
134 get_user(bstime->tv_nsec, &bstime32->tv_nsec)) 134 get_user(bstime->tv_nsec, &bstime32->tv_nsec))
135 return -XFS_ERROR(EFAULT); 135 return -EFAULT;
136 bstime->tv_sec = sec32; 136 bstime->tv_sec = sec32;
137 return 0; 137 return 0;
138} 138}
@@ -164,7 +164,7 @@ xfs_ioctl32_bstat_copyin(
164 get_user(bstat->bs_dmevmask, &bstat32->bs_dmevmask) || 164 get_user(bstat->bs_dmevmask, &bstat32->bs_dmevmask) ||
165 get_user(bstat->bs_dmstate, &bstat32->bs_dmstate) || 165 get_user(bstat->bs_dmstate, &bstat32->bs_dmstate) ||
166 get_user(bstat->bs_aextents, &bstat32->bs_aextents)) 166 get_user(bstat->bs_aextents, &bstat32->bs_aextents))
167 return -XFS_ERROR(EFAULT); 167 return -EFAULT;
168 return 0; 168 return 0;
169} 169}
170 170
@@ -180,7 +180,7 @@ xfs_bstime_store_compat(
180 sec32 = p->tv_sec; 180 sec32 = p->tv_sec;
181 if (put_user(sec32, &p32->tv_sec) || 181 if (put_user(sec32, &p32->tv_sec) ||
182 put_user(p->tv_nsec, &p32->tv_nsec)) 182 put_user(p->tv_nsec, &p32->tv_nsec))
183 return -XFS_ERROR(EFAULT); 183 return -EFAULT;
184 return 0; 184 return 0;
185} 185}
186 186
@@ -195,7 +195,7 @@ xfs_bulkstat_one_fmt_compat(
195 compat_xfs_bstat_t __user *p32 = ubuffer; 195 compat_xfs_bstat_t __user *p32 = ubuffer;
196 196
197 if (ubsize < sizeof(*p32)) 197 if (ubsize < sizeof(*p32))
198 return XFS_ERROR(ENOMEM); 198 return -ENOMEM;
199 199
200 if (put_user(buffer->bs_ino, &p32->bs_ino) || 200 if (put_user(buffer->bs_ino, &p32->bs_ino) ||
201 put_user(buffer->bs_mode, &p32->bs_mode) || 201 put_user(buffer->bs_mode, &p32->bs_mode) ||
@@ -218,7 +218,7 @@ xfs_bulkstat_one_fmt_compat(
218 put_user(buffer->bs_dmevmask, &p32->bs_dmevmask) || 218 put_user(buffer->bs_dmevmask, &p32->bs_dmevmask) ||
219 put_user(buffer->bs_dmstate, &p32->bs_dmstate) || 219 put_user(buffer->bs_dmstate, &p32->bs_dmstate) ||
220 put_user(buffer->bs_aextents, &p32->bs_aextents)) 220 put_user(buffer->bs_aextents, &p32->bs_aextents))
221 return XFS_ERROR(EFAULT); 221 return -EFAULT;
222 if (ubused) 222 if (ubused)
223 *ubused = sizeof(*p32); 223 *ubused = sizeof(*p32);
224 return 0; 224 return 0;
@@ -256,30 +256,30 @@ xfs_compat_ioc_bulkstat(
256 /* should be called again (unused here, but used in dmapi) */ 256 /* should be called again (unused here, but used in dmapi) */
257 257
258 if (!capable(CAP_SYS_ADMIN)) 258 if (!capable(CAP_SYS_ADMIN))
259 return -XFS_ERROR(EPERM); 259 return -EPERM;
260 260
261 if (XFS_FORCED_SHUTDOWN(mp)) 261 if (XFS_FORCED_SHUTDOWN(mp))
262 return -XFS_ERROR(EIO); 262 return -EIO;
263 263
264 if (get_user(addr, &p32->lastip)) 264 if (get_user(addr, &p32->lastip))
265 return -XFS_ERROR(EFAULT); 265 return -EFAULT;
266 bulkreq.lastip = compat_ptr(addr); 266 bulkreq.lastip = compat_ptr(addr);
267 if (get_user(bulkreq.icount, &p32->icount) || 267 if (get_user(bulkreq.icount, &p32->icount) ||
268 get_user(addr, &p32->ubuffer)) 268 get_user(addr, &p32->ubuffer))
269 return -XFS_ERROR(EFAULT); 269 return -EFAULT;
270 bulkreq.ubuffer = compat_ptr(addr); 270 bulkreq.ubuffer = compat_ptr(addr);
271 if (get_user(addr, &p32->ocount)) 271 if (get_user(addr, &p32->ocount))
272 return -XFS_ERROR(EFAULT); 272 return -EFAULT;
273 bulkreq.ocount = compat_ptr(addr); 273 bulkreq.ocount = compat_ptr(addr);
274 274
275 if (copy_from_user(&inlast, bulkreq.lastip, sizeof(__s64))) 275 if (copy_from_user(&inlast, bulkreq.lastip, sizeof(__s64)))
276 return -XFS_ERROR(EFAULT); 276 return -EFAULT;
277 277
278 if ((count = bulkreq.icount) <= 0) 278 if ((count = bulkreq.icount) <= 0)
279 return -XFS_ERROR(EINVAL); 279 return -EINVAL;
280 280
281 if (bulkreq.ubuffer == NULL) 281 if (bulkreq.ubuffer == NULL)
282 return -XFS_ERROR(EINVAL); 282 return -EINVAL;
283 283
284 if (cmd == XFS_IOC_FSINUMBERS_32) { 284 if (cmd == XFS_IOC_FSINUMBERS_32) {
285 error = xfs_inumbers(mp, &inlast, &count, 285 error = xfs_inumbers(mp, &inlast, &count,
@@ -294,17 +294,17 @@ xfs_compat_ioc_bulkstat(
294 xfs_bulkstat_one_compat, sizeof(compat_xfs_bstat_t), 294 xfs_bulkstat_one_compat, sizeof(compat_xfs_bstat_t),
295 bulkreq.ubuffer, &done); 295 bulkreq.ubuffer, &done);
296 } else 296 } else
297 error = XFS_ERROR(EINVAL); 297 error = -EINVAL;
298 if (error) 298 if (error)
299 return -error; 299 return error;
300 300
301 if (bulkreq.ocount != NULL) { 301 if (bulkreq.ocount != NULL) {
302 if (copy_to_user(bulkreq.lastip, &inlast, 302 if (copy_to_user(bulkreq.lastip, &inlast,
303 sizeof(xfs_ino_t))) 303 sizeof(xfs_ino_t)))
304 return -XFS_ERROR(EFAULT); 304 return -EFAULT;
305 305
306 if (copy_to_user(bulkreq.ocount, &count, sizeof(count))) 306 if (copy_to_user(bulkreq.ocount, &count, sizeof(count)))
307 return -XFS_ERROR(EFAULT); 307 return -EFAULT;
308 } 308 }
309 309
310 return 0; 310 return 0;
@@ -318,7 +318,7 @@ xfs_compat_handlereq_copyin(
318 compat_xfs_fsop_handlereq_t hreq32; 318 compat_xfs_fsop_handlereq_t hreq32;
319 319
320 if (copy_from_user(&hreq32, arg32, sizeof(compat_xfs_fsop_handlereq_t))) 320 if (copy_from_user(&hreq32, arg32, sizeof(compat_xfs_fsop_handlereq_t)))
321 return -XFS_ERROR(EFAULT); 321 return -EFAULT;
322 322
323 hreq->fd = hreq32.fd; 323 hreq->fd = hreq32.fd;
324 hreq->path = compat_ptr(hreq32.path); 324 hreq->path = compat_ptr(hreq32.path);
@@ -352,19 +352,19 @@ xfs_compat_attrlist_by_handle(
352 char *kbuf; 352 char *kbuf;
353 353
354 if (!capable(CAP_SYS_ADMIN)) 354 if (!capable(CAP_SYS_ADMIN))
355 return -XFS_ERROR(EPERM); 355 return -EPERM;
356 if (copy_from_user(&al_hreq, arg, 356 if (copy_from_user(&al_hreq, arg,
357 sizeof(compat_xfs_fsop_attrlist_handlereq_t))) 357 sizeof(compat_xfs_fsop_attrlist_handlereq_t)))
358 return -XFS_ERROR(EFAULT); 358 return -EFAULT;
359 if (al_hreq.buflen < sizeof(struct attrlist) || 359 if (al_hreq.buflen < sizeof(struct attrlist) ||
360 al_hreq.buflen > XATTR_LIST_MAX) 360 al_hreq.buflen > XATTR_LIST_MAX)
361 return -XFS_ERROR(EINVAL); 361 return -EINVAL;
362 362
363 /* 363 /*
364 * Reject flags, only allow namespaces. 364 * Reject flags, only allow namespaces.
365 */ 365 */
366 if (al_hreq.flags & ~(ATTR_ROOT | ATTR_SECURE)) 366 if (al_hreq.flags & ~(ATTR_ROOT | ATTR_SECURE))
367 return -XFS_ERROR(EINVAL); 367 return -EINVAL;
368 368
369 dentry = xfs_compat_handlereq_to_dentry(parfilp, &al_hreq.hreq); 369 dentry = xfs_compat_handlereq_to_dentry(parfilp, &al_hreq.hreq);
370 if (IS_ERR(dentry)) 370 if (IS_ERR(dentry))
@@ -376,7 +376,7 @@ xfs_compat_attrlist_by_handle(
376 goto out_dput; 376 goto out_dput;
377 377
378 cursor = (attrlist_cursor_kern_t *)&al_hreq.pos; 378 cursor = (attrlist_cursor_kern_t *)&al_hreq.pos;
379 error = -xfs_attr_list(XFS_I(dentry->d_inode), kbuf, al_hreq.buflen, 379 error = xfs_attr_list(XFS_I(dentry->d_inode), kbuf, al_hreq.buflen,
380 al_hreq.flags, cursor); 380 al_hreq.flags, cursor);
381 if (error) 381 if (error)
382 goto out_kfree; 382 goto out_kfree;
@@ -404,10 +404,10 @@ xfs_compat_attrmulti_by_handle(
404 unsigned char *attr_name; 404 unsigned char *attr_name;
405 405
406 if (!capable(CAP_SYS_ADMIN)) 406 if (!capable(CAP_SYS_ADMIN))
407 return -XFS_ERROR(EPERM); 407 return -EPERM;
408 if (copy_from_user(&am_hreq, arg, 408 if (copy_from_user(&am_hreq, arg,
409 sizeof(compat_xfs_fsop_attrmulti_handlereq_t))) 409 sizeof(compat_xfs_fsop_attrmulti_handlereq_t)))
410 return -XFS_ERROR(EFAULT); 410 return -EFAULT;
411 411
412 /* overflow check */ 412 /* overflow check */
413 if (am_hreq.opcount >= INT_MAX / sizeof(compat_xfs_attr_multiop_t)) 413 if (am_hreq.opcount >= INT_MAX / sizeof(compat_xfs_attr_multiop_t))
@@ -417,7 +417,7 @@ xfs_compat_attrmulti_by_handle(
417 if (IS_ERR(dentry)) 417 if (IS_ERR(dentry))
418 return PTR_ERR(dentry); 418 return PTR_ERR(dentry);
419 419
420 error = E2BIG; 420 error = -E2BIG;
421 size = am_hreq.opcount * sizeof(compat_xfs_attr_multiop_t); 421 size = am_hreq.opcount * sizeof(compat_xfs_attr_multiop_t);
422 if (!size || size > 16 * PAGE_SIZE) 422 if (!size || size > 16 * PAGE_SIZE)
423 goto out_dput; 423 goto out_dput;
@@ -428,7 +428,7 @@ xfs_compat_attrmulti_by_handle(
428 goto out_dput; 428 goto out_dput;
429 } 429 }
430 430
431 error = ENOMEM; 431 error = -ENOMEM;
432 attr_name = kmalloc(MAXNAMELEN, GFP_KERNEL); 432 attr_name = kmalloc(MAXNAMELEN, GFP_KERNEL);
433 if (!attr_name) 433 if (!attr_name)
434 goto out_kfree_ops; 434 goto out_kfree_ops;
@@ -439,7 +439,7 @@ xfs_compat_attrmulti_by_handle(
439 compat_ptr(ops[i].am_attrname), 439 compat_ptr(ops[i].am_attrname),
440 MAXNAMELEN); 440 MAXNAMELEN);
441 if (ops[i].am_error == 0 || ops[i].am_error == MAXNAMELEN) 441 if (ops[i].am_error == 0 || ops[i].am_error == MAXNAMELEN)
442 error = ERANGE; 442 error = -ERANGE;
443 if (ops[i].am_error < 0) 443 if (ops[i].am_error < 0)
444 break; 444 break;
445 445
@@ -470,19 +470,19 @@ xfs_compat_attrmulti_by_handle(
470 mnt_drop_write_file(parfilp); 470 mnt_drop_write_file(parfilp);
471 break; 471 break;
472 default: 472 default:
473 ops[i].am_error = EINVAL; 473 ops[i].am_error = -EINVAL;
474 } 474 }
475 } 475 }
476 476
477 if (copy_to_user(compat_ptr(am_hreq.ops), ops, size)) 477 if (copy_to_user(compat_ptr(am_hreq.ops), ops, size))
478 error = XFS_ERROR(EFAULT); 478 error = -EFAULT;
479 479
480 kfree(attr_name); 480 kfree(attr_name);
481 out_kfree_ops: 481 out_kfree_ops:
482 kfree(ops); 482 kfree(ops);
483 out_dput: 483 out_dput:
484 dput(dentry); 484 dput(dentry);
485 return -error; 485 return error;
486} 486}
487 487
488STATIC int 488STATIC int
@@ -496,26 +496,26 @@ xfs_compat_fssetdm_by_handle(
496 struct dentry *dentry; 496 struct dentry *dentry;
497 497
498 if (!capable(CAP_MKNOD)) 498 if (!capable(CAP_MKNOD))
499 return -XFS_ERROR(EPERM); 499 return -EPERM;
500 if (copy_from_user(&dmhreq, arg, 500 if (copy_from_user(&dmhreq, arg,
501 sizeof(compat_xfs_fsop_setdm_handlereq_t))) 501 sizeof(compat_xfs_fsop_setdm_handlereq_t)))
502 return -XFS_ERROR(EFAULT); 502 return -EFAULT;
503 503
504 dentry = xfs_compat_handlereq_to_dentry(parfilp, &dmhreq.hreq); 504 dentry = xfs_compat_handlereq_to_dentry(parfilp, &dmhreq.hreq);
505 if (IS_ERR(dentry)) 505 if (IS_ERR(dentry))
506 return PTR_ERR(dentry); 506 return PTR_ERR(dentry);
507 507
508 if (IS_IMMUTABLE(dentry->d_inode) || IS_APPEND(dentry->d_inode)) { 508 if (IS_IMMUTABLE(dentry->d_inode) || IS_APPEND(dentry->d_inode)) {
509 error = -XFS_ERROR(EPERM); 509 error = -EPERM;
510 goto out; 510 goto out;
511 } 511 }
512 512
513 if (copy_from_user(&fsd, compat_ptr(dmhreq.data), sizeof(fsd))) { 513 if (copy_from_user(&fsd, compat_ptr(dmhreq.data), sizeof(fsd))) {
514 error = -XFS_ERROR(EFAULT); 514 error = -EFAULT;
515 goto out; 515 goto out;
516 } 516 }
517 517
518 error = -xfs_set_dmattrs(XFS_I(dentry->d_inode), fsd.fsd_dmevmask, 518 error = xfs_set_dmattrs(XFS_I(dentry->d_inode), fsd.fsd_dmevmask,
519 fsd.fsd_dmstate); 519 fsd.fsd_dmstate);
520 520
521out: 521out:
@@ -588,7 +588,7 @@ xfs_file_compat_ioctl(
588 struct xfs_flock64 bf; 588 struct xfs_flock64 bf;
589 589
590 if (xfs_compat_flock64_copyin(&bf, arg)) 590 if (xfs_compat_flock64_copyin(&bf, arg))
591 return -XFS_ERROR(EFAULT); 591 return -EFAULT;
592 cmd = _NATIVE_IOC(cmd, struct xfs_flock64); 592 cmd = _NATIVE_IOC(cmd, struct xfs_flock64);
593 return xfs_ioc_space(ip, inode, filp, ioflags, cmd, &bf); 593 return xfs_ioc_space(ip, inode, filp, ioflags, cmd, &bf);
594 } 594 }
@@ -598,25 +598,25 @@ xfs_file_compat_ioctl(
598 struct xfs_growfs_data in; 598 struct xfs_growfs_data in;
599 599
600 if (xfs_compat_growfs_data_copyin(&in, arg)) 600 if (xfs_compat_growfs_data_copyin(&in, arg))
601 return -XFS_ERROR(EFAULT); 601 return -EFAULT;
602 error = mnt_want_write_file(filp); 602 error = mnt_want_write_file(filp);
603 if (error) 603 if (error)
604 return error; 604 return error;
605 error = xfs_growfs_data(mp, &in); 605 error = xfs_growfs_data(mp, &in);
606 mnt_drop_write_file(filp); 606 mnt_drop_write_file(filp);
607 return -error; 607 return error;
608 } 608 }
609 case XFS_IOC_FSGROWFSRT_32: { 609 case XFS_IOC_FSGROWFSRT_32: {
610 struct xfs_growfs_rt in; 610 struct xfs_growfs_rt in;
611 611
612 if (xfs_compat_growfs_rt_copyin(&in, arg)) 612 if (xfs_compat_growfs_rt_copyin(&in, arg))
613 return -XFS_ERROR(EFAULT); 613 return -EFAULT;
614 error = mnt_want_write_file(filp); 614 error = mnt_want_write_file(filp);
615 if (error) 615 if (error)
616 return error; 616 return error;
617 error = xfs_growfs_rt(mp, &in); 617 error = xfs_growfs_rt(mp, &in);
618 mnt_drop_write_file(filp); 618 mnt_drop_write_file(filp);
619 return -error; 619 return error;
620 } 620 }
621#endif 621#endif
622 /* long changes size, but xfs only copiese out 32 bits */ 622 /* long changes size, but xfs only copiese out 32 bits */
@@ -633,13 +633,13 @@ xfs_file_compat_ioctl(
633 if (copy_from_user(&sxp, sxu, 633 if (copy_from_user(&sxp, sxu,
634 offsetof(struct xfs_swapext, sx_stat)) || 634 offsetof(struct xfs_swapext, sx_stat)) ||
635 xfs_ioctl32_bstat_copyin(&sxp.sx_stat, &sxu->sx_stat)) 635 xfs_ioctl32_bstat_copyin(&sxp.sx_stat, &sxu->sx_stat))
636 return -XFS_ERROR(EFAULT); 636 return -EFAULT;
637 error = mnt_want_write_file(filp); 637 error = mnt_want_write_file(filp);
638 if (error) 638 if (error)
639 return error; 639 return error;
640 error = xfs_ioc_swapext(&sxp); 640 error = xfs_ioc_swapext(&sxp);
641 mnt_drop_write_file(filp); 641 mnt_drop_write_file(filp);
642 return -error; 642 return error;
643 } 643 }
644 case XFS_IOC_FSBULKSTAT_32: 644 case XFS_IOC_FSBULKSTAT_32:
645 case XFS_IOC_FSBULKSTAT_SINGLE_32: 645 case XFS_IOC_FSBULKSTAT_SINGLE_32:
@@ -651,7 +651,7 @@ xfs_file_compat_ioctl(
651 struct xfs_fsop_handlereq hreq; 651 struct xfs_fsop_handlereq hreq;
652 652
653 if (xfs_compat_handlereq_copyin(&hreq, arg)) 653 if (xfs_compat_handlereq_copyin(&hreq, arg))
654 return -XFS_ERROR(EFAULT); 654 return -EFAULT;
655 cmd = _NATIVE_IOC(cmd, struct xfs_fsop_handlereq); 655 cmd = _NATIVE_IOC(cmd, struct xfs_fsop_handlereq);
656 return xfs_find_handle(cmd, &hreq); 656 return xfs_find_handle(cmd, &hreq);
657 } 657 }
@@ -659,14 +659,14 @@ xfs_file_compat_ioctl(
659 struct xfs_fsop_handlereq hreq; 659 struct xfs_fsop_handlereq hreq;
660 660
661 if (xfs_compat_handlereq_copyin(&hreq, arg)) 661 if (xfs_compat_handlereq_copyin(&hreq, arg))
662 return -XFS_ERROR(EFAULT); 662 return -EFAULT;
663 return xfs_open_by_handle(filp, &hreq); 663 return xfs_open_by_handle(filp, &hreq);
664 } 664 }
665 case XFS_IOC_READLINK_BY_HANDLE_32: { 665 case XFS_IOC_READLINK_BY_HANDLE_32: {
666 struct xfs_fsop_handlereq hreq; 666 struct xfs_fsop_handlereq hreq;
667 667
668 if (xfs_compat_handlereq_copyin(&hreq, arg)) 668 if (xfs_compat_handlereq_copyin(&hreq, arg))
669 return -XFS_ERROR(EFAULT); 669 return -EFAULT;
670 return xfs_readlink_by_handle(filp, &hreq); 670 return xfs_readlink_by_handle(filp, &hreq);
671 } 671 }
672 case XFS_IOC_ATTRLIST_BY_HANDLE_32: 672 case XFS_IOC_ATTRLIST_BY_HANDLE_32:
@@ -676,6 +676,6 @@ xfs_file_compat_ioctl(
676 case XFS_IOC_FSSETDM_BY_HANDLE_32: 676 case XFS_IOC_FSSETDM_BY_HANDLE_32:
677 return xfs_compat_fssetdm_by_handle(filp, arg); 677 return xfs_compat_fssetdm_by_handle(filp, arg);
678 default: 678 default:
679 return -XFS_ERROR(ENOIOCTLCMD); 679 return -ENOIOCTLCMD;
680 } 680 }
681} 681}