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

Submitted by Konstantin Khorenko on Feb. 20, 2017, 1:11 p.m.

Details

Message ID 201702201311.v1KDB2e6008977@finist_cl7.x64_64.work.ct
State New
Series "fs: Revert "ms: FIGETBSZ ioctl safety checks""
Headers show

Commit Message

Konstantin Khorenko Feb. 20, 2017, 1:11 p.m.
The commit is pushed to "branch-rh7-3.10.0-514.6.1.vz7.28.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.6.1.vz7.28.6
------>
commit 68db81da423d6967be85fa982273e6d19417f8e6
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Mon Feb 20 17:11:02 2017 +0400

    fs: Revert "ms: FIGETBSZ ioctl safety checks"
    
    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>
    Reviewed-by: Pavel Tikhomirov <ptikhomirov@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 f0d0cf9..dea5a20 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);