]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/linux-2.6/xfs_ioctl.c
[XFS] Make d_maxiosz report the real maximum (INT_MAX) so we dont
[linux-2.6-omap-h63xx.git] / fs / xfs / linux-2.6 / xfs_ioctl.c
index b78b5eb9e96ca620dbbc9eaf6d37a04ddc4a2fc4..71eabf4bf3978e0cd84e4c379dfcb1b42feea5dd 100644 (file)
@@ -530,6 +530,8 @@ xfs_attrmulti_attr_set(
        char                    *kbuf;
        int                     error = EFAULT;
 
+       if (IS_RDONLY(&vp->v_inode))
+               return -EROFS;
        if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode))
                return EPERM;
        if (len > XATTR_SIZE_MAX)
@@ -557,6 +559,9 @@ xfs_attrmulti_attr_remove(
 {
        int                     error;
 
+
+       if (IS_RDONLY(&vp->v_inode))
+               return -EROFS;
        if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode))
                return EPERM;
 
@@ -746,8 +751,7 @@ xfs_ioctl(
                        mp->m_rtdev_targp : mp->m_ddev_targp;
 
                da.d_mem = da.d_miniosz = 1 << target->pbr_sshift;
-               /* The size dio will do in one go */
-               da.d_maxiosz = 64 * PAGE_CACHE_SIZE;
+               da.d_maxiosz = INT_MAX;
 
                if (copy_to_user(arg, &da, sizeof(da)))
                        return -XFS_ERROR(EFAULT);