diff options
-rw-r--r-- | fs/ioctl.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/ioctl.c b/fs/ioctl.c index 82d9c42b8bac..286f38dfc6c0 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c | |||
@@ -414,10 +414,6 @@ static int file_ioctl(struct file *filp, unsigned int cmd, | |||
414 | switch (cmd) { | 414 | switch (cmd) { |
415 | case FIBMAP: | 415 | case FIBMAP: |
416 | return ioctl_fibmap(filp, p); | 416 | return ioctl_fibmap(filp, p); |
417 | case FS_IOC_FIEMAP: | ||
418 | return ioctl_fiemap(filp, arg); | ||
419 | case FIGETBSZ: | ||
420 | return put_user(inode->i_sb->s_blocksize, p); | ||
421 | case FIONREAD: | 417 | case FIONREAD: |
422 | return put_user(i_size_read(inode) - filp->f_pos, p); | 418 | return put_user(i_size_read(inode) - filp->f_pos, p); |
423 | } | 419 | } |
@@ -557,6 +553,16 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, | |||
557 | error = ioctl_fsthaw(filp); | 553 | error = ioctl_fsthaw(filp); |
558 | break; | 554 | break; |
559 | 555 | ||
556 | case FS_IOC_FIEMAP: | ||
557 | return ioctl_fiemap(filp, arg); | ||
558 | |||
559 | case FIGETBSZ: | ||
560 | { | ||
561 | struct inode *inode = filp->f_path.dentry->d_inode; | ||
562 | int __user *p = (int __user *)arg; | ||
563 | return put_user(inode->i_sb->s_blocksize, p); | ||
564 | } | ||
565 | |||
560 | default: | 566 | default: |
561 | if (S_ISREG(filp->f_path.dentry->d_inode->i_mode)) | 567 | if (S_ISREG(filp->f_path.dentry->d_inode->i_mode)) |
562 | error = file_ioctl(filp, cmd, arg); | 568 | error = file_ioctl(filp, cmd, arg); |