#include "xfs_trans.h"
#include "xfs_sb.h"
#include "xfs_ag.h"
+#include "xfs_dir.h"
#include "xfs_dir2.h"
#include "xfs_alloc.h"
#include "xfs_dmapi.h"
#include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h"
+#include "xfs_dir_sf.h"
#include "xfs_attr_sf.h"
#include "xfs_dir2_sf.h"
#include "xfs_dinode.h"
xfs_handle_t handle;
xfs_fsop_handlereq_t hreq;
struct inode *inode;
- bhv_vnode_t *vp;
+ struct vnode *vp;
if (copy_from_user(&hreq, arg, sizeof(hreq)))
return -XFS_ERROR(EFAULT);
xfs_mount_t *mp,
struct inode *parinode, /* parent inode pointer */
xfs_fsop_handlereq_t *hreq,
- bhv_vnode_t **vp,
+ vnode_t **vp,
struct inode **inode)
{
void __user *hanp;
xfs_handle_t handle;
xfs_inode_t *ip;
struct inode *inodep;
- bhv_vnode_t *vpp;
+ vnode_t *vpp;
xfs_ino_t ino;
__u32 igen;
int error;
struct file *filp;
struct inode *inode;
struct dentry *dentry;
- bhv_vnode_t *vp;
+ vnode_t *vp;
xfs_fsop_handlereq_t hreq;
if (!capable(CAP_SYS_ADMIN))
struct uio auio;
struct inode *inode;
xfs_fsop_handlereq_t hreq;
- bhv_vnode_t *vp;
+ vnode_t *vp;
__u32 olen;
if (!capable(CAP_SYS_ADMIN))
auio.uio_segflg = UIO_USERSPACE;
auio.uio_resid = olen;
- error = bhv_vop_readlink(vp, &auio, IO_INVIS, NULL);
- VN_RELE(vp);
- if (error)
- return -error;
+ VOP_READLINK(vp, &auio, IO_INVIS, NULL, error);
+ VN_RELE(vp);
return (olen - auio.uio_resid);
}
xfs_fsop_setdm_handlereq_t dmhreq;
struct inode *inode;
bhv_desc_t *bdp;
- bhv_vnode_t *vp;
+ vnode_t *vp;
if (!capable(CAP_MKNOD))
return -XFS_ERROR(EPERM);
attrlist_cursor_kern_t *cursor;
xfs_fsop_attrlist_handlereq_t al_hreq;
struct inode *inode;
- bhv_vnode_t *vp;
+ vnode_t *vp;
char *kbuf;
if (!capable(CAP_SYS_ADMIN))
goto out_vn_rele;
cursor = (attrlist_cursor_kern_t *)&al_hreq.pos;
- error = bhv_vop_attr_list(vp, kbuf, al_hreq.buflen, al_hreq.flags,
- cursor, NULL);
+ VOP_ATTR_LIST(vp, kbuf, al_hreq.buflen, al_hreq.flags,
+ cursor, NULL, error);
if (error)
goto out_kfree;
STATIC int
xfs_attrmulti_attr_get(
- bhv_vnode_t *vp,
+ struct vnode *vp,
char *name,
char __user *ubuf,
__uint32_t *len,
if (!kbuf)
return ENOMEM;
- error = bhv_vop_attr_get(vp, name, kbuf, len, flags, NULL);
+ VOP_ATTR_GET(vp, name, kbuf, len, flags, NULL, error);
if (error)
goto out_kfree;
STATIC int
xfs_attrmulti_attr_set(
- bhv_vnode_t *vp,
+ struct vnode *vp,
char *name,
const char __user *ubuf,
__uint32_t len,
if (copy_from_user(kbuf, ubuf, len))
goto out_kfree;
- error = bhv_vop_attr_set(vp, name, kbuf, len, flags, NULL);
+ VOP_ATTR_SET(vp, name, kbuf, len, flags, NULL, error);
out_kfree:
kfree(kbuf);
STATIC int
xfs_attrmulti_attr_remove(
- bhv_vnode_t *vp,
+ struct vnode *vp,
char *name,
__uint32_t flags)
{
+ int error;
+
+
if (IS_RDONLY(&vp->v_inode))
return -EROFS;
if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode))
return EPERM;
- return bhv_vop_attr_remove(vp, name, flags, NULL);
+
+ VOP_ATTR_REMOVE(vp, name, flags, NULL, error);
+ return error;
}
STATIC int
xfs_attr_multiop_t *ops;
xfs_fsop_attrmulti_handlereq_t am_hreq;
struct inode *inode;
- bhv_vnode_t *vp;
+ vnode_t *vp;
unsigned int i, size;
char *attr_name;
STATIC int
xfs_ioc_space(
bhv_desc_t *bdp,
- bhv_vnode_t *vp,
+ vnode_t *vp,
struct file *filp,
int flags,
unsigned int cmd,
STATIC int
xfs_ioc_xattr(
- bhv_vnode_t *vp,
+ vnode_t *vp,
xfs_inode_t *ip,
struct file *filp,
unsigned int cmd,
void __user *arg)
{
int error;
- bhv_vnode_t *vp;
+ vnode_t *vp;
xfs_inode_t *ip;
xfs_mount_t *mp;
STATIC int
xfs_ioc_space(
bhv_desc_t *bdp,
- bhv_vnode_t *vp,
+ vnode_t *vp,
struct file *filp,
int ioflags,
unsigned int cmd,
STATIC int
xfs_ioc_xattr(
- bhv_vnode_t *vp,
+ vnode_t *vp,
xfs_inode_t *ip,
struct file *filp,
unsigned int cmd,
void __user *arg)
{
struct fsxattr fa;
- struct bhv_vattr *vattr;
+ struct vattr *vattr;
int error = 0;
int attr_flags;
unsigned int flags;
case XFS_IOC_FSGETXATTR: {
vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \
XFS_AT_NEXTENTS | XFS_AT_PROJID;
- error = bhv_vop_getattr(vp, vattr, 0, NULL);
+ VOP_GETATTR(vp, vattr, 0, NULL, error);
if (unlikely(error)) {
error = -error;
break;
vattr->va_extsize = fa.fsx_extsize;
vattr->va_projid = fa.fsx_projid;
- error = bhv_vop_setattr(vp, vattr, attr_flags, NULL);
+ VOP_SETATTR(vp, vattr, attr_flags, NULL, error);
if (likely(!error))
__vn_revalidate(vp, vattr); /* update flags */
error = -error;
case XFS_IOC_FSGETXATTRA: {
vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \
XFS_AT_ANEXTENTS | XFS_AT_PROJID;
- error = bhv_vop_getattr(vp, vattr, 0, NULL);
+ VOP_GETATTR(vp, vattr, 0, NULL, error);
if (unlikely(error)) {
error = -error;
break;
vattr->va_xflags = xfs_merge_ioc_xflags(flags,
xfs_ip2xflags(ip));
- error = bhv_vop_setattr(vp, vattr, attr_flags, NULL);
+ VOP_SETATTR(vp, vattr, attr_flags, NULL, error);
if (likely(!error))
__vn_revalidate(vp, vattr); /* update flags */
error = -error;