Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: Kill file_priv->ioctl_count tracking

It's racy, and it's only used in debugfs. There are simpler ways to
know whether something is going on (like looking at dmesg with full
debugging enabled). And they're all much more useful.

So let's just rip this out.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Daniel Vetter and committed by
Dave Airlie
5952fba5 43d1337c

+3 -7
-2
drivers/gpu/drm/drm_drv.c
··· 315 315 if (drm_device_is_unplugged(dev)) 316 316 return -ENODEV; 317 317 318 - ++file_priv->ioctl_count; 319 - 320 318 if ((nr >= DRM_CORE_IOCTL_COUNT) && 321 319 ((nr < DRM_COMMAND_BASE) || (nr >= DRM_COMMAND_END))) 322 320 goto err_i1;
-1
drivers/gpu/drm/drm_fops.c
··· 232 232 goto out_put_pid; 233 233 } 234 234 235 - priv->ioctl_count = 0; 236 235 /* for compatibility root is always authenticated */ 237 236 priv->always_authenticated = capable(CAP_SYS_ADMIN); 238 237 priv->authenticated = priv->always_authenticated;
+3 -3
drivers/gpu/drm/drm_info.c
··· 186 186 struct drm_file *priv; 187 187 188 188 mutex_lock(&dev->struct_mutex); 189 - seq_printf(m, "a dev pid uid magic ioctls\n\n"); 189 + seq_printf(m, "a dev pid uid magic\n\n"); 190 190 list_for_each_entry(priv, &dev->filelist, lhead) { 191 - seq_printf(m, "%c %3d %5d %5d %10u %10lu\n", 191 + seq_printf(m, "%c %3d %5d %5d %10u\n", 192 192 priv->authenticated ? 'y' : 'n', 193 193 priv->minor->index, 194 194 pid_vnr(priv->pid), 195 195 from_kuid_munged(seq_user_ns(m), priv->uid), 196 - priv->magic, priv->ioctl_count); 196 + priv->magic); 197 197 } 198 198 mutex_unlock(&dev->struct_mutex); 199 199 return 0;
-1
include/drm/drmP.h
··· 438 438 struct pid *pid; 439 439 kuid_t uid; 440 440 drm_magic_t magic; 441 - unsigned long ioctl_count; 442 441 struct list_head lhead; 443 442 struct drm_minor *minor; 444 443 unsigned long lock_count;