diff options
| author | Robert Richter <robert.richter@amd.com> | 2010-04-23 14:30:22 +0200 |
|---|---|---|
| committer | Robert Richter <robert.richter@amd.com> | 2010-04-23 14:30:22 +0200 |
| commit | a36bf32e9e8a86f291f746b7f8292e042ee04a46 (patch) | |
| tree | c5c999baa4c214218e3adea9b336cbd9f23950ad /fs/ext4/ioctl.c | |
| parent | bc078e4eab65f11bbaeed380593ab8151b30d703 (diff) | |
| parent | 01bf0b64579ead8a82e7cfc32ae44bc667e7ad0f (diff) | |
Merge commit 'v2.6.34-rc5' into oprofile/core
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) flags &= ~EXT4_EXTENTS_FL; } + if (flags & EXT4_EOFBLOCKS_FL) { + /* we don't support adding EOFBLOCKS flag */ + if (!(oldflags & EXT4_EOFBLOCKS_FL)) { + err = -EOPNOTSUPP; + goto flags_out; + } + } else if (oldflags & EXT4_EOFBLOCKS_FL) + ext4_truncate(inode); + handle = ext4_journal_start(inode, 1); if (IS_ERR(handle)) { err = PTR_ERR(handle); @@ -249,7 +258,8 @@ setversion_out: if (me.moved_len > 0) file_remove_suid(donor_filp); - if (copy_to_user((struct move_extent *)arg, &me, sizeof(me))) + if (copy_to_user((struct move_extent __user *)arg, + &me, sizeof(me))) err = -EFAULT; mext_out: fput(donor_filp); |
