[Devel] fs: Revert "ms: FIGETBSZ ioctl safety checks"

Submitted by Kirill Tkhai on Feb. 13, 2017, 12:55 p.m.

Details

Message ID 148699048919.5527.11843657922464121179.stgit@localhost.localdomain
State New
Series "fs: Revert "ms: FIGETBSZ ioctl safety checks""
Headers show

Commit Message

Kirill Tkhai Feb. 13, 2017, 12:55 p.m.
This reverts commit 6cd9b88060b21f3d597d54d93a97c4a17c917c4f.

It was need for vefs_ioctl(), but we do not support vefs anymore.

https://jira.sw.ru/browse/PSBM-58480

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 fs/ioctl.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fs/ioctl.c b/fs/ioctl.c
index f0d0cf945c3..dea5a20610a 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -589,12 +589,8 @@  int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
 		return ioctl_fiemap(filp, arg);
 
 	case FIGETBSZ:
-	{
-		struct super_block *sb = filp->f_path.dentry->d_inode->i_sb;
-		if (sb->s_blocksize == 1ul << sb->s_blocksize_bits)
-			return put_user(inode->i_sb->s_blocksize, argp);
-		/* fail through */
-	}
+		return put_user(inode->i_sb->s_blocksize, argp);
+
 	default:
 		if (S_ISREG(inode->i_mode))
 			error = file_ioctl(filp, cmd, arg);

Comments

Pavel Tikhomirov Feb. 13, 2017, 1:28 p.m.
On 02/13/2017 03:55 PM, Kirill Tkhai wrote:
> This reverts commit 6cd9b88060b21f3d597d54d93a97c4a17c917c4f.
>
> It was need for vefs_ioctl(), but we do not support vefs anymore.

Sure, Thanks!

>
> https://jira.sw.ru/browse/PSBM-58480
>
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>

Reviewed-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>

> ---
>  fs/ioctl.c |    8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/fs/ioctl.c b/fs/ioctl.c
> index f0d0cf945c3..dea5a20610a 100644
> --- a/fs/ioctl.c
> +++ b/fs/ioctl.c
> @@ -589,12 +589,8 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
>  		return ioctl_fiemap(filp, arg);
>
>  	case FIGETBSZ:
> -	{
> -		struct super_block *sb = filp->f_path.dentry->d_inode->i_sb;
> -		if (sb->s_blocksize == 1ul << sb->s_blocksize_bits)
> -			return put_user(inode->i_sb->s_blocksize, argp);
> -		/* fail through */
> -	}
> +		return put_user(inode->i_sb->s_blocksize, argp);
> +
>  	default:
>  		if (S_ISREG(inode->i_mode))
>  			error = file_ioctl(filp, cmd, arg);
>