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

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Mon Feb 13 05:28:11 PST 2017


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 at virtuozzo.com>

Reviewed-by: Pavel Tikhomirov <ptikhomirov at 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);
>

-- 
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.


More information about the Devel mailing list