aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/ioctl.c')
-rw-r--r--fs/reiserfs/ioctl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c
index 94dc42475a04..76caedf737f2 100644
--- a/fs/reiserfs/ioctl.c
+++ b/fs/reiserfs/ioctl.c
@@ -36,10 +36,16 @@ int reiserfs_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
36 /* following two cases are taken from fs/ext2/ioctl.c by Remy 36 /* following two cases are taken from fs/ext2/ioctl.c by Remy
37 Card (card@masi.ibp.fr) */ 37 Card (card@masi.ibp.fr) */
38 case REISERFS_IOC_GETFLAGS: 38 case REISERFS_IOC_GETFLAGS:
39 if (!reiserfs_attrs (inode->i_sb))
40 return -ENOTTY;
41
39 flags = REISERFS_I(inode) -> i_attrs; 42 flags = REISERFS_I(inode) -> i_attrs;
40 i_attrs_to_sd_attrs( inode, ( __u16 * ) &flags ); 43 i_attrs_to_sd_attrs( inode, ( __u16 * ) &flags );
41 return put_user(flags, (int __user *) arg); 44 return put_user(flags, (int __user *) arg);
42 case REISERFS_IOC_SETFLAGS: { 45 case REISERFS_IOC_SETFLAGS: {
46 if (!reiserfs_attrs (inode->i_sb))
47 return -ENOTTY;
48
43 if (IS_RDONLY(inode)) 49 if (IS_RDONLY(inode))
44 return -EROFS; 50 return -EROFS;
45 51