diff options
author | Joe Perches <joe@perches.com> | 2018-05-24 15:38:59 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-05-24 15:38:59 -0400 |
commit | 5657a819a8d94426c76be04dcedfad0f64cfff00 (patch) | |
tree | 62834703d02999728dd5c0c0c3842ffe525d6182 /drivers/block/rbd.c | |
parent | e6fc46498784e799d3eb95d83079180e413c4e7d (diff) |
block drivers/block: Use octal not symbolic permissions
Convert the S_<FOO> symbolic permissions to their octal equivalents as
using octal and not symbolic permissions is preferred by many as more
readable.
see: https://lkml.org/lkml/2016/8/2/1945
Done with automated conversion via:
$ ./scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplace <files...>
Miscellanea:
o Wrapped modified multi-line calls to a single line where appropriate
o Realign modified multi-line calls to open parenthesis
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r-- | drivers/block/rbd.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 8e8b04cc569a..7e669c1042b1 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -424,7 +424,7 @@ static struct workqueue_struct *rbd_wq; | |||
424 | * single-major requires >= 0.75 version of userspace rbd utility. | 424 | * single-major requires >= 0.75 version of userspace rbd utility. |
425 | */ | 425 | */ |
426 | static bool single_major = true; | 426 | static bool single_major = true; |
427 | module_param(single_major, bool, S_IRUGO); | 427 | module_param(single_major, bool, 0444); |
428 | MODULE_PARM_DESC(single_major, "Use a single major number for all rbd devices (default: true)"); | 428 | MODULE_PARM_DESC(single_major, "Use a single major number for all rbd devices (default: true)"); |
429 | 429 | ||
430 | static ssize_t rbd_add(struct bus_type *bus, const char *buf, | 430 | static ssize_t rbd_add(struct bus_type *bus, const char *buf, |
@@ -468,11 +468,11 @@ static ssize_t rbd_supported_features_show(struct bus_type *bus, char *buf) | |||
468 | return sprintf(buf, "0x%llx\n", RBD_FEATURES_SUPPORTED); | 468 | return sprintf(buf, "0x%llx\n", RBD_FEATURES_SUPPORTED); |
469 | } | 469 | } |
470 | 470 | ||
471 | static BUS_ATTR(add, S_IWUSR, NULL, rbd_add); | 471 | static BUS_ATTR(add, 0200, NULL, rbd_add); |
472 | static BUS_ATTR(remove, S_IWUSR, NULL, rbd_remove); | 472 | static BUS_ATTR(remove, 0200, NULL, rbd_remove); |
473 | static BUS_ATTR(add_single_major, S_IWUSR, NULL, rbd_add_single_major); | 473 | static BUS_ATTR(add_single_major, 0200, NULL, rbd_add_single_major); |
474 | static BUS_ATTR(remove_single_major, S_IWUSR, NULL, rbd_remove_single_major); | 474 | static BUS_ATTR(remove_single_major, 0200, NULL, rbd_remove_single_major); |
475 | static BUS_ATTR(supported_features, S_IRUGO, rbd_supported_features_show, NULL); | 475 | static BUS_ATTR(supported_features, 0444, rbd_supported_features_show, NULL); |
476 | 476 | ||
477 | static struct attribute *rbd_bus_attrs[] = { | 477 | static struct attribute *rbd_bus_attrs[] = { |
478 | &bus_attr_add.attr, | 478 | &bus_attr_add.attr, |
@@ -4202,22 +4202,22 @@ static ssize_t rbd_image_refresh(struct device *dev, | |||
4202 | return size; | 4202 | return size; |
4203 | } | 4203 | } |
4204 | 4204 | ||
4205 | static DEVICE_ATTR(size, S_IRUGO, rbd_size_show, NULL); | 4205 | static DEVICE_ATTR(size, 0444, rbd_size_show, NULL); |
4206 | static DEVICE_ATTR(features, S_IRUGO, rbd_features_show, NULL); | 4206 | static DEVICE_ATTR(features, 0444, rbd_features_show, NULL); |
4207 | static DEVICE_ATTR(major, S_IRUGO, rbd_major_show, NULL); | 4207 | static DEVICE_ATTR(major, 0444, rbd_major_show, NULL); |
4208 | static DEVICE_ATTR(minor, S_IRUGO, rbd_minor_show, NULL); | 4208 | static DEVICE_ATTR(minor, 0444, rbd_minor_show, NULL); |
4209 | static DEVICE_ATTR(client_addr, S_IRUGO, rbd_client_addr_show, NULL); | 4209 | static DEVICE_ATTR(client_addr, 0444, rbd_client_addr_show, NULL); |
4210 | static DEVICE_ATTR(client_id, S_IRUGO, rbd_client_id_show, NULL); | 4210 | static DEVICE_ATTR(client_id, 0444, rbd_client_id_show, NULL); |
4211 | static DEVICE_ATTR(cluster_fsid, S_IRUGO, rbd_cluster_fsid_show, NULL); | 4211 | static DEVICE_ATTR(cluster_fsid, 0444, rbd_cluster_fsid_show, NULL); |
4212 | static DEVICE_ATTR(config_info, S_IRUSR, rbd_config_info_show, NULL); | 4212 | static DEVICE_ATTR(config_info, 0400, rbd_config_info_show, NULL); |
4213 | static DEVICE_ATTR(pool, S_IRUGO, rbd_pool_show, NULL); | 4213 | static DEVICE_ATTR(pool, 0444, rbd_pool_show, NULL); |
4214 | static DEVICE_ATTR(pool_id, S_IRUGO, rbd_pool_id_show, NULL); | 4214 | static DEVICE_ATTR(pool_id, 0444, rbd_pool_id_show, NULL); |
4215 | static DEVICE_ATTR(name, S_IRUGO, rbd_name_show, NULL); | 4215 | static DEVICE_ATTR(name, 0444, rbd_name_show, NULL); |
4216 | static DEVICE_ATTR(image_id, S_IRUGO, rbd_image_id_show, NULL); | 4216 | static DEVICE_ATTR(image_id, 0444, rbd_image_id_show, NULL); |
4217 | static DEVICE_ATTR(refresh, S_IWUSR, NULL, rbd_image_refresh); | 4217 | static DEVICE_ATTR(refresh, 0200, NULL, rbd_image_refresh); |
4218 | static DEVICE_ATTR(current_snap, S_IRUGO, rbd_snap_show, NULL); | 4218 | static DEVICE_ATTR(current_snap, 0444, rbd_snap_show, NULL); |
4219 | static DEVICE_ATTR(snap_id, S_IRUGO, rbd_snap_id_show, NULL); | 4219 | static DEVICE_ATTR(snap_id, 0444, rbd_snap_id_show, NULL); |
4220 | static DEVICE_ATTR(parent, S_IRUGO, rbd_parent_show, NULL); | 4220 | static DEVICE_ATTR(parent, 0444, rbd_parent_show, NULL); |
4221 | 4221 | ||
4222 | static struct attribute *rbd_attrs[] = { | 4222 | static struct attribute *rbd_attrs[] = { |
4223 | &dev_attr_size.attr, | 4223 | &dev_attr_size.attr, |