diff options
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r-- | fs/ext4/ioctl.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index b63d193126db..016d0249294f 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c | |||
@@ -92,6 +92,15 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
92 | flags &= ~EXT4_EXTENTS_FL; | 92 | flags &= ~EXT4_EXTENTS_FL; |
93 | } | 93 | } |
94 | 94 | ||
95 | if (flags & EXT4_EOFBLOCKS_FL) { | ||
96 | /* we don't support adding EOFBLOCKS flag */ | ||
97 | if (!(oldflags & EXT4_EOFBLOCKS_FL)) { | ||
98 | err = -EOPNOTSUPP; | ||
99 | goto flags_out; | ||
100 | } | ||
101 | } else if (oldflags & EXT4_EOFBLOCKS_FL) | ||
102 | ext4_truncate(inode); | ||
103 | |||
95 | handle = ext4_journal_start(inode, 1); | 104 | handle = ext4_journal_start(inode, 1); |
96 | if (IS_ERR(handle)) { | 105 | if (IS_ERR(handle)) { |
97 | err = PTR_ERR(handle); | 106 | err = PTR_ERR(handle); |
@@ -249,7 +258,8 @@ setversion_out: | |||
249 | if (me.moved_len > 0) | 258 | if (me.moved_len > 0) |
250 | file_remove_suid(donor_filp); | 259 | file_remove_suid(donor_filp); |
251 | 260 | ||
252 | if (copy_to_user((struct move_extent *)arg, &me, sizeof(me))) | 261 | if (copy_to_user((struct move_extent __user *)arg, |
262 | &me, sizeof(me))) | ||
253 | err = -EFAULT; | 263 | err = -EFAULT; |
254 | mext_out: | 264 | mext_out: |
255 | fput(donor_filp); | 265 | fput(donor_filp); |