diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index b78b5eb9e96c..f98c5be3dfe7 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -530,6 +530,8 @@ xfs_attrmulti_attr_set( | |||
530 | char *kbuf; | 530 | char *kbuf; |
531 | int error = EFAULT; | 531 | int error = EFAULT; |
532 | 532 | ||
533 | if (IS_RDONLY(&vp->v_inode)) | ||
534 | return -EROFS; | ||
533 | if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) | 535 | if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) |
534 | return EPERM; | 536 | return EPERM; |
535 | if (len > XATTR_SIZE_MAX) | 537 | if (len > XATTR_SIZE_MAX) |
@@ -557,6 +559,9 @@ xfs_attrmulti_attr_remove( | |||
557 | { | 559 | { |
558 | int error; | 560 | int error; |
559 | 561 | ||
562 | |||
563 | if (IS_RDONLY(&vp->v_inode)) | ||
564 | return -EROFS; | ||
560 | if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) | 565 | if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) |
561 | return EPERM; | 566 | return EPERM; |
562 | 567 | ||