[S390] tape: duplicate sysfs filename when setting tape device online

When a tape device is set online, offline and online again, the following
error message is printed on the console: "sysfs: duplicate filename
'non-rewinding' can not be created". The reason is that when setting a
device online, the tape driver creates a sysfs symlink from the tape device
to the tape class device. Unfortunately the symlink is not removed
correctly, when the device is set offline. Instead of passing the
tape device object to sysfs_remove_link, the class device object is used.
This patch fixes this problem and uses the correct tape device object now.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
这个提交包含在:
Michael Holzheu
2008-04-17 07:46:05 +02:00
提交者 Heiko Carstens
父节点 00966c0a5b
当前提交 92bf435f38
修改 3 个文件,包含 5 行新增6 行删除

查看文件

@@ -56,6 +56,6 @@ struct tape_class_device *register_tape_dev(
char * device_name,
char * node_name
);
void unregister_tape_dev(struct tape_class_device *tcd);
void unregister_tape_dev(struct device *device, struct tape_class_device *tcd);
#endif /* __TAPE_CLASS_H__ */