diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-03 19:24:08 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-01-04 07:24:34 +0300 |
commit | d5dbcca70182501bed99de85c224cef04c38ed92 (patch) | |
tree | 6d37b9f276c5963926fb370d47fb684e4b521c79 /include/linux/pktcdvd.h | |
parent | 498860df8edc069ba63449891e531706594f6791 (diff) | |
download | linux-d5dbcca70182501bed99de85c224cef04c38ed92.tar.xz |
pktcdvd: convert to use attribute groups
There is no need to create kobject children of the pktcdvd device just
to display a subdirectory name. Instead, use a named attribute group
which removes the extra kobjects and also fixes the userspace race where
the device is created yet tools like libudev can not see the attributes
as they think the subdirectories are some other sort of device.
Cc: linux-block@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220103162408.742003-1-gregkh@linuxfoundation.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/pktcdvd.h')
-rw-r--r-- | include/linux/pktcdvd.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index c391e694aa26..f9c5ac80d59b 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h @@ -152,14 +152,6 @@ struct packet_stacked_data }; #define PSD_POOL_SIZE 64 -struct pktcdvd_kobj -{ - struct kobject kobj; - struct pktcdvd_device *pd; -}; -#define to_pktcdvdkobj(_k) \ - ((struct pktcdvd_kobj*)container_of(_k,struct pktcdvd_kobj,kobj)) - struct pktcdvd_device { struct block_device *bdev; /* dev attached */ @@ -197,8 +189,6 @@ struct pktcdvd_device int write_congestion_on; struct device *dev; /* sysfs pktcdvd[0-7] dev */ - struct pktcdvd_kobj *kobj_stat; /* sysfs pktcdvd[0-7]/stat/ */ - struct pktcdvd_kobj *kobj_wqueue; /* sysfs pktcdvd[0-7]/write_queue/ */ struct dentry *dfs_d_root; /* debugfs: devname directory */ struct dentry *dfs_f_info; /* debugfs: info file */ |