[Top] [All Lists]

[PATCH -mm] xfs: pass inode to xfs_ioc_space()

To: Andrew Morton <akpm@xxxxxxxx>
Subject: [PATCH -mm] xfs: pass inode to xfs_ioc_space()
From: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Date: Tue, 20 Jun 2006 15:04:06 +0400
Cc: xfs@xxxxxxxxxxx, Nathan Scott <nathans@xxxxxxx>
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=Jw/iMDL7/eA7gASkc87yuYB0ERDUTdWktCmjf+xTwKbfGV0VmXELK1MTnZLw2KsoWdgHQFPnMP00UQ7xDK12yL0naHfuJhjwTGEzJVK6OyJyuOWu9UlI2DVNB6frBho/NUmTCkNM/oUdzJdgiNkmpxV4JGfPDI2lOjgYqNMHktQ=
In-reply-to: <20060620014555.b127e89d.akpm@xxxxxxxx>
References: <20060620064131.GA7337@xxxxxxxxxxxxxxxxxxxxxx> <20060620014555.b127e89d.akpm@xxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.11
* There is trivial "inode => vnode => inode" conversion, but only flags and
  mode of final inode are looked at. Pass original inode instead.
* Two occurences of bhv_vnode_t go out.

Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>

 Against git://oss.sgi.com:8090/xfs-2.6. Suppose this one is -mm fodder.

 fs/xfs/linux-2.6/xfs_ioctl.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -653,7 +653,7 @@ xfs_attrmulti_by_handle(
        bhv_desc_t              *bdp,
-       bhv_vnode_t             *vp,
+       struct inode            *inode,
        struct file             *filp,
        int                     flags,
        unsigned int            cmd,
@@ -735,7 +735,7 @@ xfs_ioctl(
                        return -EPERM;
-               return xfs_ioc_space(bdp, vp, filp, ioflags, cmd, arg);
+               return xfs_ioc_space(bdp, inode, filp, ioflags, cmd, arg);
        case XFS_IOC_DIOINFO: {
                struct dioattr  da;
@@ -957,7 +957,7 @@ xfs_ioctl(
        bhv_desc_t              *bdp,
-       bhv_vnode_t             *vp,
+       struct inode            *inode,
        struct file             *filp,
        int                     ioflags,
        unsigned int            cmd,
@@ -967,13 +967,13 @@ xfs_ioc_space(
        int                     attr_flags = 0;
        int                     error;
-       if (vp->v_inode.i_flags & (S_IMMUTABLE|S_APPEND))
+       if (inode->i_flags & (S_IMMUTABLE|S_APPEND))
                return -XFS_ERROR(EPERM);
        if (!(filp->f_mode & FMODE_WRITE))
                return -XFS_ERROR(EBADF);
-       if (!VN_ISREG(vp))
+       if (!S_ISREG(inode->i_mode))
                return -XFS_ERROR(EINVAL);
        if (copy_from_user(&bf, arg, sizeof(bf)))

<Prev in Thread] Current Thread [Next in Thread>