diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-06-19 13:01:04 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-06-20 10:46:04 -0400 |
commit | 482e0cd3dbaa70f2a2bead4b5f2c0d203ef654ba (patch) | |
tree | 68d885682da34a08c29908d012a356344882a487 /security | |
parent | 8e833fd2e1f0107ee7a4b6bc4de3c9f0e9b0ed41 (diff) |
devcgroup_inode_permission: take "is it a device node" checks to inlined wrapper
inode_permission() calls devcgroup_inode_permission() and almost all such
calls are _not_ for device nodes; let's at least keep the common path
straight...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security')
-rw-r--r-- | security/device_cgroup.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/security/device_cgroup.c b/security/device_cgroup.c index cd1f779fa51d..1be68269e1c2 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c | |||
@@ -474,17 +474,11 @@ struct cgroup_subsys devices_subsys = { | |||
474 | .subsys_id = devices_subsys_id, | 474 | .subsys_id = devices_subsys_id, |
475 | }; | 475 | }; |
476 | 476 | ||
477 | int devcgroup_inode_permission(struct inode *inode, int mask) | 477 | int __devcgroup_inode_permission(struct inode *inode, int mask) |
478 | { | 478 | { |
479 | struct dev_cgroup *dev_cgroup; | 479 | struct dev_cgroup *dev_cgroup; |
480 | struct dev_whitelist_item *wh; | 480 | struct dev_whitelist_item *wh; |
481 | 481 | ||
482 | dev_t device = inode->i_rdev; | ||
483 | if (!device) | ||
484 | return 0; | ||
485 | if (!S_ISBLK(inode->i_mode) && !S_ISCHR(inode->i_mode)) | ||
486 | return 0; | ||
487 | |||
488 | rcu_read_lock(); | 482 | rcu_read_lock(); |
489 | 483 | ||
490 | dev_cgroup = task_devcgroup(current); | 484 | dev_cgroup = task_devcgroup(current); |