diff options
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r-- | fs/ext4/ioctl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index b63d193126db..2220feb2dcc1 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); |