aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index f36902fa714d..9bba9f8be1eb 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -413,7 +413,7 @@ xfs_readlink_by_handle(
413 if (!link) 413 if (!link)
414 goto out_iput; 414 goto out_iput;
415 415
416 error = -bhv_vop_readlink(vp, link); 416 error = -xfs_readlink(XFS_I(inode), link);
417 if (error) 417 if (error)
418 goto out_kfree; 418 goto out_kfree;
419 error = do_readlink(hreq.ohandle, olen, link); 419 error = do_readlink(hreq.ohandle, olen, link);
@@ -497,8 +497,8 @@ xfs_attrlist_by_handle(
497 goto out_vn_rele; 497 goto out_vn_rele;
498 498
499 cursor = (attrlist_cursor_kern_t *)&al_hreq.pos; 499 cursor = (attrlist_cursor_kern_t *)&al_hreq.pos;
500 error = bhv_vop_attr_list(vp, kbuf, al_hreq.buflen, al_hreq.flags, 500 error = xfs_attr_list(XFS_I(inode), kbuf, al_hreq.buflen,
501 cursor, NULL); 501 al_hreq.flags, cursor);
502 if (error) 502 if (error)
503 goto out_kfree; 503 goto out_kfree;
504 504
@@ -515,7 +515,7 @@ xfs_attrlist_by_handle(
515 515
516STATIC int 516STATIC int
517xfs_attrmulti_attr_get( 517xfs_attrmulti_attr_get(
518 bhv_vnode_t *vp, 518 struct inode *inode,
519 char *name, 519 char *name,
520 char __user *ubuf, 520 char __user *ubuf,
521 __uint32_t *len, 521 __uint32_t *len,
@@ -530,7 +530,7 @@ xfs_attrmulti_attr_get(
530 if (!kbuf) 530 if (!kbuf)
531 return ENOMEM; 531 return ENOMEM;
532 532
533 error = bhv_vop_attr_get(vp, name, kbuf, len, flags, NULL); 533 error = xfs_attr_get(XFS_I(inode), name, kbuf, len, flags, NULL);
534 if (error) 534 if (error)
535 goto out_kfree; 535 goto out_kfree;
536 536
@@ -544,7 +544,7 @@ xfs_attrmulti_attr_get(
544 544
545STATIC int 545STATIC int
546xfs_attrmulti_attr_set( 546xfs_attrmulti_attr_set(
547 bhv_vnode_t *vp, 547 struct inode *inode,
548 char *name, 548 char *name,
549 const char __user *ubuf, 549 const char __user *ubuf,
550 __uint32_t len, 550 __uint32_t len,
@@ -553,9 +553,9 @@ xfs_attrmulti_attr_set(
553 char *kbuf; 553 char *kbuf;
554 int error = EFAULT; 554 int error = EFAULT;
555 555
556 if (IS_RDONLY(&vp->v_inode)) 556 if (IS_RDONLY(inode))
557 return -EROFS; 557 return -EROFS;
558 if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) 558 if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
559 return EPERM; 559 return EPERM;
560 if (len > XATTR_SIZE_MAX) 560 if (len > XATTR_SIZE_MAX)
561 return EINVAL; 561 return EINVAL;
@@ -567,7 +567,7 @@ xfs_attrmulti_attr_set(
567 if (copy_from_user(kbuf, ubuf, len)) 567 if (copy_from_user(kbuf, ubuf, len))
568 goto out_kfree; 568 goto out_kfree;
569 569
570 error = bhv_vop_attr_set(vp, name, kbuf, len, flags, NULL); 570 error = xfs_attr_set(XFS_I(inode), name, kbuf, len, flags);
571 571
572 out_kfree: 572 out_kfree:
573 kfree(kbuf); 573 kfree(kbuf);
@@ -576,15 +576,15 @@ xfs_attrmulti_attr_set(
576 576
577STATIC int 577STATIC int
578xfs_attrmulti_attr_remove( 578xfs_attrmulti_attr_remove(
579 bhv_vnode_t *vp, 579 struct inode *inode,
580 char *name, 580 char *name,
581 __uint32_t flags) 581 __uint32_t flags)
582{ 582{
583 if (IS_RDONLY(&vp->v_inode)) 583 if (IS_RDONLY(inode))
584 return -EROFS; 584 return -EROFS;
585 if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) 585 if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
586 return EPERM; 586 return EPERM;
587 return bhv_vop_attr_remove(vp, name, flags, NULL); 587 return xfs_attr_remove(XFS_I(inode), name, flags);
588} 588}
589 589
590STATIC int 590STATIC int
@@ -640,17 +640,17 @@ xfs_attrmulti_by_handle(
640 640
641 switch (ops[i].am_opcode) { 641 switch (ops[i].am_opcode) {
642 case ATTR_OP_GET: 642 case ATTR_OP_GET:
643 ops[i].am_error = xfs_attrmulti_attr_get(vp, 643 ops[i].am_error = xfs_attrmulti_attr_get(inode,
644 attr_name, ops[i].am_attrvalue, 644 attr_name, ops[i].am_attrvalue,
645 &ops[i].am_length, ops[i].am_flags); 645 &ops[i].am_length, ops[i].am_flags);
646 break; 646 break;
647 case ATTR_OP_SET: 647 case ATTR_OP_SET:
648 ops[i].am_error = xfs_attrmulti_attr_set(vp, 648 ops[i].am_error = xfs_attrmulti_attr_set(inode,
649 attr_name, ops[i].am_attrvalue, 649 attr_name, ops[i].am_attrvalue,
650 ops[i].am_length, ops[i].am_flags); 650 ops[i].am_length, ops[i].am_flags);
651 break; 651 break;
652 case ATTR_OP_REMOVE: 652 case ATTR_OP_REMOVE:
653 ops[i].am_error = xfs_attrmulti_attr_remove(vp, 653 ops[i].am_error = xfs_attrmulti_attr_remove(inode,
654 attr_name, ops[i].am_flags); 654 attr_name, ops[i].am_flags);
655 break; 655 break;
656 default: 656 default:
@@ -1182,7 +1182,7 @@ xfs_ioc_xattr(
1182 case XFS_IOC_FSGETXATTR: { 1182 case XFS_IOC_FSGETXATTR: {
1183 vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \ 1183 vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \
1184 XFS_AT_NEXTENTS | XFS_AT_PROJID; 1184 XFS_AT_NEXTENTS | XFS_AT_PROJID;
1185 error = bhv_vop_getattr(vp, vattr, 0, NULL); 1185 error = xfs_getattr(ip, vattr, 0);
1186 if (unlikely(error)) { 1186 if (unlikely(error)) {
1187 error = -error; 1187 error = -error;
1188 break; 1188 break;
@@ -1215,7 +1215,7 @@ xfs_ioc_xattr(
1215 vattr->va_extsize = fa.fsx_extsize; 1215 vattr->va_extsize = fa.fsx_extsize;
1216 vattr->va_projid = fa.fsx_projid; 1216 vattr->va_projid = fa.fsx_projid;
1217 1217
1218 error = bhv_vop_setattr(vp, vattr, attr_flags, NULL); 1218 error = xfs_setattr(ip, vattr, attr_flags, NULL);
1219 if (likely(!error)) 1219 if (likely(!error))
1220 __vn_revalidate(vp, vattr); /* update flags */ 1220 __vn_revalidate(vp, vattr); /* update flags */
1221 error = -error; 1221 error = -error;
@@ -1225,7 +1225,7 @@ xfs_ioc_xattr(
1225 case XFS_IOC_FSGETXATTRA: { 1225 case XFS_IOC_FSGETXATTRA: {
1226 vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \ 1226 vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \
1227 XFS_AT_ANEXTENTS | XFS_AT_PROJID; 1227 XFS_AT_ANEXTENTS | XFS_AT_PROJID;
1228 error = bhv_vop_getattr(vp, vattr, 0, NULL); 1228 error = xfs_getattr(ip, vattr, 0);
1229 if (unlikely(error)) { 1229 if (unlikely(error)) {
1230 error = -error; 1230 error = -error;
1231 break; 1231 break;
@@ -1271,7 +1271,7 @@ xfs_ioc_xattr(
1271 vattr->va_xflags = xfs_merge_ioc_xflags(flags, 1271 vattr->va_xflags = xfs_merge_ioc_xflags(flags,
1272 xfs_ip2xflags(ip)); 1272 xfs_ip2xflags(ip));
1273 1273
1274 error = bhv_vop_setattr(vp, vattr, attr_flags, NULL); 1274 error = xfs_setattr(ip, vattr, attr_flags, NULL);
1275 if (likely(!error)) 1275 if (likely(!error))
1276 __vn_revalidate(vp, vattr); /* update flags */ 1276 __vn_revalidate(vp, vattr); /* update flags */
1277 error = -error; 1277 error = -error;