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

Konstantin Khorenko khorenko at virtuozzo.com
Mon Feb 20 05:11:02 PST 2017


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 at 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 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 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);


More information about the Devel mailing list